/external/python/cpython2/Demo/threads/ |
fcmp.py | 0 # Coroutine example: controlling multiple instances of a single function 3 from Coroutine import * 15 co = Coroutine() 31 co1 = Coroutine(); f1 = co1.create(fringe, co1, l1) 32 co2 = Coroutine(); f2 = co2.create(fringe, co2, l2)
|
squasher.py | 0 # Coroutine example: general coroutine transfers 43 from Coroutine import * 95 co = Coroutine()
|
Coroutine.py | 0 # Coroutine implementation using Python threads. 3 # Combines ideas from Guido's Generator module, and from the coroutine 7 # a Coroutine object to control them: 8 # co = Coroutine() 20 # co.tran is called the "main coroutine". It's special in several 21 # respects: it existed before you created the Coroutine object; if any of 23 # exception), EarlyExit error is raised in the main coroutine; and the 24 # co.detach() method transfers control directly to the main coroutine 25 # (you can't use co.tran() for this because the main coroutine doesn't 28 # Coroutine objects support these methods [all...] |
/external/clang/lib/Sema/ |
SemaCoroutine.cpp | 102 /// Check that this is a context in which a coroutine suspension can appear. 112 // FIXME: Reject a coroutine with a deduced return type. 120 // A special member function shall not be a coroutine. 122 // FIXME: We assume that this really means that a coroutine cannot 204 // FIXME: Pass coroutine handle to await_suspend. 228 auto *Coroutine = checkCoroutineContext(*this, Loc, "co_await"); 229 if (!Coroutine) 240 Coroutine->CoroutineStmts.push_back(Res); 256 Coroutine->CoroutineStmts.push_back(Res); 260 static ExprResult buildPromiseCall(Sema &S, FunctionScopeInfo *Coroutine, [all...] |
/external/python/cpython3/Lib/asyncio/ |
coroutines.py | 1 __all__ = ['coroutine', 21 # If you set _DEBUG to true, @coroutine will wrap the resulting 25 # coroutine call. Note that the value of the _DEBUG flag is taken 35 _types_coroutine = types.coroutine 49 from collections.abc import Coroutine as _CoroutineABC, \ 82 # Generator-based coroutines are wrapped in @coroutine 88 # Wrapper for coroutine object in _DEBUG mode. 93 self.func = func # Used to unwrap @coroutine decorator 151 "Cannot await on coroutine {!r} while it's " 192 def coroutine(func) function [all...] |
/external/python/cpython3/Lib/ |
types.py | 211 def coroutine(func): function 212 """Convert regular generator function to a coroutine.""" 215 raise TypeError('types.coroutine() expects a callable') 222 # Check if 'func' is a coroutine function. 251 # 'coro' is a native coroutine object or an iterable coroutine 254 not isinstance(coro, _collections_abc.Coroutine)): 257 # collections.abc.Coroutine). 259 # 'coro' is either an instance of collections.abc.Coroutine or
|
_collections_abc.py | 12 __all__ = ["Awaitable", "Coroutine", 57 ## coroutine ## 60 coroutine = type(_coro) variable 114 class Coroutine(Awaitable): 120 """Send a value into the coroutine. 127 """Raise an exception in the coroutine. 139 """Raise GeneratorExit inside coroutine. 146 raise RuntimeError("coroutine ignored GeneratorExit") 150 if cls is Coroutine: 155 Coroutine.register(coroutine [all...] |
typing.py | 58 # Coroutine, [all...] |
/external/python/cpython3/Lib/test/ |
test_collections.py | 22 from collections.abc import Awaitable, Coroutine 516 @types.coroutine 527 class MinimalCoro(Coroutine): 556 Coroutine.register(CoroLike) 566 @types.coroutine 577 class MinimalCoro(Coroutine): 587 self.assertNotIsInstance(x, Coroutine) 588 self.assertFalse(issubclass(type(x), Coroutine), repr(type(x))) 598 # of Coroutine. Use inspect.isawaitable to detect them. 599 self.assertNotIsInstance(c, Coroutine) [all...] |
test_typing.py | [all...] |
test_types.py | [all...] |
/external/python/cpython3/Lib/pydoc_data/ |
topics.py | [all...] |