Home
last modified time | relevance | path

Searched refs:coroutine (Results 1 – 25 of 88) sorted by relevance

1234

/third_party/python/Doc/library/
Dasyncio-task.rst21 :term:`Coroutines <coroutine>` declared with the async/await syntax is the
37 Note that simply calling a coroutine will not schedule it to
41 <coroutine object main at 0x1053bb7c8>
43 To actually run a coroutine, asyncio provides three main mechanisms:
48 * Awaiting on a coroutine. The following snippet of code will
132 # A coroutine object is created but not awaited,
143 In this documentation the term "coroutine" can be used for
146 * a *coroutine function*: an :keyword:`async def` function;
148 * a *coroutine object*: an object returned by calling a
149 *coroutine function*.
[all …]
Dasyncio-dev.rst50 <asyncio-coroutine-not-scheduled>` and logs them; this mitigates
89 To schedule a coroutine object from a different OS thread, the
151 .. _asyncio-coroutine-not-scheduled:
156 When a coroutine function is called, but not awaited
158 or the coroutine is not scheduled with :meth:`asyncio.create_task`, asyncio
173 test.py:7: RuntimeWarning: coroutine 'test' was never awaited
178 test.py:7: RuntimeWarning: coroutine 'test' was never awaited
189 The usual fix is to either await the coroutine or call the
Dcollections.abc.rst298 :term:`Coroutine <coroutine>` objects and instances of the
303 :func:`types.coroutine` or :func:`asyncio.coroutine`) are
312 ABC for coroutine compatible classes. These implement the
313 following methods, defined in :ref:`coroutine-objects`:
314 :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and
315 :meth:`~coroutine.close`. Custom implementations must also implement
317 :class:`Awaitable`. See also the definition of :term:`coroutine`.
321 :func:`types.coroutine` or :func:`asyncio.coroutine`) are
Dasyncio-api-index.rst22 - Create event loop, run a coroutine, close the loop.
55 - Schedule a coroutine from another OS thread.
73 * See also the main :ref:`Tasks documentation page <coroutine>`.
Dinspect.rst38 .. |coroutine-origin-link| replace:: :func:`sys.set_coroutine_origin_tracking_depth`
216 | coroutine | __name__ | name |
225 | | cr_running | is the coroutine running? |
229 | | cr_origin | where coroutine was |
231 | | | |coroutine-origin-link| |
328 Return ``True`` if the object is a :term:`coroutine function`
335 wrapped function is a :term:`coroutine function`.
340 Return ``True`` if the object is a :term:`coroutine` created by an
355 @types.coroutine
1354 When implementing coroutine schedulers and for other advanced uses of
[all …]
Dasyncio-sync.rst79 When more than one coroutine is blocked in :meth:`acquire`
80 waiting for the lock to be unlocked, only one coroutine
83 Acquiring a lock is *fair*: the coroutine that proceeds will be
84 the first coroutine that started waiting on the lock.
Dtypes.rst133 The type of :term:`coroutine` objects, created by
476 .. function:: coroutine(gen_func)
479 :term:`coroutine function` which returns a generator-based coroutine.
480 The generator-based coroutine is still a :term:`generator iterator`,
481 but is also considered to be a :term:`coroutine` object and is
Dasyncio-future.rst43 coroutine (:func:`iscoroutine` is used for the test);
44 in this case the coroutine will be scheduled by
239 # Run "set_after()" coroutine in a parallel Task.
Ddis.rst57 generator, coroutine, method, string of source code, or a code object (as
97 This can now handle coroutine and asynchronous generator objects.
121 for the supplied function, generator, asynchronous generator, coroutine,
131 This can now handle coroutine and asynchronous generator objects.
152 method, a function, a generator, an asynchronous generator, a coroutine,
177 This can now handle coroutine and asynchronous generator objects.
402 If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object
575 returns ``o`` if ``o`` is a coroutine object or a generator object with
1256 coroutine. The legal kinds are 0 for generator, 1 for coroutine,
Dasyncio-eventloop.rst35 This function can only be called from a coroutine or a callback.
115 If the argument is a :ref:`coroutine object <coroutine>` it
335 Schedule the execution of a :ref:`coroutine`.
356 event loop, and *coro* is a coroutine object. The callable
870 Even though this method was always documented as a coroutine
899 Even though the method was always documented as a coroutine
938 Even though the method was always documented as a coroutine
992 to return a coroutine, but prior to Python 3.7 they were, in fact,
1440 coroutine to wait until the server is closed.
1466 Start accepting connections until the coroutine is cancelled.
[all …]
Dasyncio.rst35 * :ref:`run Python coroutines <coroutine>` concurrently and
/third_party/python/Doc/c-api/
Dcoro.rst16 The C structure used for coroutine objects.
21 The type object corresponding to coroutine objects.
32 Create and return a new coroutine object based on the *frame* object,
/third_party/skia/third_party/externals/swiftshader/src/Pipeline/
DComputeProgram.cpp278 …auto coroutine = (*this)(device, &data, groupX, groupY, groupZ, workgroupMemory.data(), subgroupIn… in run() local
279 coroutines.push(std::move(coroutine)); in run()
284 …auto coroutine = (*this)(device, &data, groupX, groupY, groupZ, workgroupMemory.data(), 0, subgrou… in run() local
285 coroutines.push(std::move(coroutine)); in run()
290 auto coroutine = std::move(coroutines.front()); in run() local
294 if(coroutine->await(result)) in run()
297 coroutines.push(std::move(coroutine)); in run()
/third_party/skia/third_party/externals/swiftshader/tests/ReactorBenchmarks/
DReactorBenchmarks.cpp56 auto coroutine = function(); in BENCHMARK_DEFINE_F() local
65 coroutine->await(out); in BENCHMARK_DEFINE_F()
/third_party/python/Lib/test/
Dtest_coroutines.py573 @types.coroutine
597 @types.coroutine
628 @types.coroutine
664 @types.coroutine
728 @types.coroutine
762 @types.coroutine
793 async def coroutine(): function
796 coro = coroutine()
816 async def coroutine(): function
819 coro = coroutine()
[all …]
Dtest_types.py1759 types.coroutine(sample)
1762 @types.coroutine
1771 @types.coroutine
1777 foo = types.coroutine(foo)
1787 decorated_foo = types.coroutine(foo)
1795 bar = types.coroutine(bar)
1809 @types.coroutine
1825 @types.coroutine
1847 @types.coroutine
1928 @types.coroutine
[all …]
Dtest_asyncgen.py18 @types.coroutine
497 @types.coroutine
632 @types.coroutine
677 @types.coroutine
698 @types.coroutine
717 @types.coroutine
/third_party/skia/third_party/externals/swiftshader/src/Reactor/
DLLVMReactor.cpp4142 ASSERT(jit->coroutine.id == nullptr); in promoteFunctionToCoroutine()
4150 auto promiseTy = jit->coroutine.yieldType; in promoteFunctionToCoroutine()
4189 auto args = jit->coroutine.await->arg_begin(); in promoteFunctionToCoroutine()
4192 …jit->builder->SetInsertPoint(llvm::BasicBlock::Create(*jit->context, "co_await", jit->coroutine.aw… in promoteFunctionToCoroutine()
4193 auto doneBlock = llvm::BasicBlock::Create(*jit->context, "done", jit->coroutine.await); in promoteFunctionToCoroutine()
4194 auto resumeBlock = llvm::BasicBlock::Create(*jit->context, "resume", jit->coroutine.await); in promoteFunctionToCoroutine()
4219 auto handle = jit->coroutine.destroy->arg_begin(); in promoteFunctionToCoroutine()
4220 jit->builder->SetInsertPoint(llvm::BasicBlock::Create(*jit->context, "", jit->coroutine.destroy)); in promoteFunctionToCoroutine()
4262 jit->coroutine.suspendBlock = llvm::BasicBlock::Create(*jit->context, "suspend", jit->function); in promoteFunctionToCoroutine()
4263 jit->coroutine.endBlock = llvm::BasicBlock::Create(*jit->context, "end", jit->function); in promoteFunctionToCoroutine()
[all …]
DLLVMReactor.hpp116 CoroutineState coroutine; member in rr::JITBuilder
/third_party/python/Lib/test/test_asyncio/
Dtest_tasks.py239 @asyncio.coroutine
324 @asyncio.coroutine
457 @asyncio.coroutine
540 partial_func = asyncio.coroutine(functools.partial(func, 1))
745 @asyncio.coroutine
1304 @asyncio.coroutine
1569 @asyncio.coroutine
1709 @asyncio.coroutine
1714 @asyncio.coroutine
1883 @asyncio.coroutine
[all …]
Dtest_pep492.py132 @asyncio.coroutine
169 @types.coroutine
/third_party/python/Lib/asyncio/
Dcoroutines.py105 def coroutine(func): function
139 coro = types.coroutine(coro)
/third_party/skia/third_party/externals/swiftshader/tests/ReactorUnitTests/
DReactorUnitTests.cpp2515 auto coroutine = function(); in TEST() local
2520 EXPECT_EQ(coroutine->await(out), true); in TEST()
2546 auto coroutine = function(&data[0], 3); in TEST() local
2549 EXPECT_EQ(coroutine->await(out), true); in TEST()
2552 EXPECT_EQ(coroutine->await(out), true); in TEST()
2555 EXPECT_EQ(coroutine->await(out), true); in TEST()
2558 EXPECT_EQ(coroutine->await(out), false); in TEST()
2560 EXPECT_EQ(coroutine->await(out), false); in TEST()
2586 auto coroutine = function(); in TEST() local
2589 coroutine->await(out); in TEST()
[all …]
/third_party/python/Lib/unittest/test/testmock/
Dtestasync.py742 async def _await_coroutine(self, coroutine): argument
743 return await coroutine
787 coroutine = mock.async_method()
795 run(self._await_coroutine(coroutine))
801 coroutine = mock.async_method()
803 run(self._await_coroutine(coroutine))
806 run(self._await_coroutine(coroutine))
/third_party/python/Misc/NEWS.d/
D3.7.0b1.rst7 Fix coroutine's ResourceWarning when there's an active error set when it's
91 Added built-in support for tracking the origin of coroutine objects; see
93 replaces the asyncio debug mode's use of coroutine wrapping for native
94 coroutine objects.

1234