Home
last modified time | relevance | path

Searched refs:fut (Results 1 – 25 of 50) sorted by relevance

12

/external/python/cpython3/Modules/
D_asynciomodule.c74 FutureObj_HEAD(fut)
198 get_future_loop(PyObject *fut) in get_future_loop() argument
206 if (Future_CheckExact(fut) || Task_CheckExact(fut)) { in get_future_loop()
207 PyObject *loop = ((FutureObj *)fut)->fut_loop; in get_future_loop()
212 if (_PyObject_LookupAttrId(fut, &PyId_get_loop, &getloop) < 0) { in get_future_loop()
221 return _PyObject_GetAttrId(fut, &PyId__loop); in get_future_loop()
381 future_is_alive(FutureObj *fut) in future_is_alive() argument
383 return fut->fut_loop != NULL; in future_is_alive()
388 future_ensure_alive(FutureObj *fut) in future_ensure_alive() argument
390 if (!future_is_alive(fut)) { in future_ensure_alive()
[all …]
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_futures.py152 fut = self.cls.__new__(self.cls, loop=self.loop)
153 self.assertRaises(asyncio.InvalidStateError, fut.result)
155 fut = self.cls.__new__(self.cls, loop=self.loop)
156 self.assertRaises(asyncio.InvalidStateError, fut.exception)
158 fut = self.cls.__new__(self.cls, loop=self.loop)
160 fut.set_result(None)
162 fut = self.cls.__new__(self.cls, loop=self.loop)
164 fut.set_exception(Exception)
166 fut = self.cls.__new__(self.cls, loop=self.loop)
168 fut.cancel()
[all …]
Dtest_windows_events.py116 fut = self.loop._proactor.wait_for_handle(event, 0.5)
118 done = self.loop.run_until_complete(fut)
122 self.assertFalse(fut.result())
131 fut = self.loop._proactor.wait_for_handle(event, 10)
133 done = self.loop.run_until_complete(fut)
137 self.assertTrue(fut.result())
142 fut.cancel()
150 fut = self.loop._proactor.wait_for_handle(event, 10)
151 fut.cancel()
154 self.loop.run_until_complete(fut)
[all …]
Dtest_tasks.py114 fut = self.new_future(other_loop)
116 async def run(fut): argument
117 await fut
122 self.loop.run_until_complete(run(fut))
228 fut = asyncio.ensure_future(Aw(coro()), loop=loop)
229 loop.run_until_complete(fut)
230 assert fut.result() == 'ok'
381 async def wait_for(fut): argument
382 return await fut
384 fut = self.new_future(self.loop)
[all …]
Dtest_proactor_events.py46 fut = asyncio.Future(loop=self.loop)
47 tr = self.socket_transport(waiter=fut)
49 self.assertIsNone(fut.result())
181 fut = asyncio.Future(loop=self.loop)
182 fut.set_result(b'data')
185 tr._write_fut = fut
186 tr._loop_writing(fut)
190 fut = asyncio.Future(loop=self.loop)
191 fut.set_result(1)
194 tr._write_fut = fut
[all …]
Dtest_base_events.py288 def check_in_thread(loop, event, debug, create_loop, fut): argument
304 loop.call_soon_threadsafe(fut.set_exception, exc)
306 loop.call_soon_threadsafe(fut.set_result, None)
310 fut = asyncio.Future(loop=loop)
312 args = (loop, event, debug, create_loop, fut)
315 loop.run_until_complete(fut)
562 def zero_error(fut): argument
563 fut.set_result(True)
568 fut = asyncio.Future(loop=self.loop)
569 self.loop.call_soon(zero_error, fut)
[all …]
Dtest_unix_events.py434 self.fut = loop.create_future()
448 self.fut.set_result(None)
451 await self.fut
545 fut = self.loop.create_future()
547 self.loop._sock_sendfile_native_impl(fut, None, sock, fileno,
549 fut.cancel()
551 self.run_loop(fut)
558 fut = self.loop.create_future()
560 self.loop._sock_sendfile_native_impl(fut, None, sock, fileno,
562 fut.cancel()
[all …]
Dtest_selector_events.py210 fut = self.loop.create_task(
226 self.assertIsInstance(fut.exception(), OSError)
305 fut = self.loop.create_task(self.loop.sock_sendall(sock, b'data'))
320 self.assertIsInstance(fut.exception(), OSError)
426 fut = self.loop.create_task(
434 fut.cancel()
436 self.loop.run_until_complete(fut)
Dtest_subprocess.py493 fut = asyncio.create_subprocess_exec(
498 process = await fut
/external/python/cpython3/Lib/asyncio/
Dlocks.py184 fut = self._loop.create_future()
185 self._waiters.append(fut)
192 await fut
194 self._waiters.remove(fut)
223 fut = next(iter(self._waiters))
230 if not fut.done():
231 fut.set_result(True)
270 for fut in self._waiters:
271 if not fut.done():
272 fut.set_result(True)
[all …]
Dtasks.py371 async def wait_for(fut, timeout, *, loop=None): argument
388 return await fut
391 fut = ensure_future(fut, loop=loop)
393 if fut.done():
394 return fut.result()
396 fut.cancel()
403 fut = ensure_future(fut, loop=loop)
404 fut.add_done_callback(cb)
411 fut.remove_done_callback(cb)
412 fut.cancel()
[all …]
Dselector_events.py350 fut = self.create_future()
351 self._sock_recv(fut, None, sock, n)
352 return await fut
354 def _sock_recv(self, fut, registered_fd, sock, n): argument
363 if fut.cancelled():
369 self.add_reader(fd, self._sock_recv, fut, fd, sock, n)
371 fut.set_exception(exc)
373 fut.set_result(data)
383 fut = self.create_future()
384 self._sock_recv_into(fut, None, sock, buf)
[all …]
Dwindows_events.py122 def _unregister_wait_cb(self, fut): argument
196 def _unregister_wait_cb(self, fut): argument
212 super()._unregister_wait_cb(fut)
418 fut = self._loop.create_future()
419 fut.set_result(value)
420 return fut
605 fut = self._wait_for_handle(event, None, True)
608 fut._done_callback = done_callback
609 return fut
769 for address, (fut, ov, obj, callback) in list(self._cache.items()):
[all …]
Dunix_events.py336 fut = self.create_future()
337 self._sock_sendfile_native_impl(fut, None, sock, fileno,
339 return await fut
341 def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno, argument
350 if fut.cancelled():
357 fut.set_result(total_sent)
364 self._sock_add_cancellation_callback(fut, sock)
365 self.add_writer(fd, self._sock_sendfile_native_impl, fut,
388 fut.set_exception(err)
391 fut.set_exception(exc)
[all …]
Dfutures.py272 def _get_loop(fut): argument
276 get_loop = fut.get_loop
281 return fut._loop
284 def _set_result_unless_cancelled(fut, result): argument
286 if fut.cancelled():
288 fut.set_result(result)
Dproactor_events.py246 def _loop_reading(self, fut=None): argument
249 if fut is not None:
250 assert self._read_fut is fut or (self._read_fut is None and
253 if fut.done():
255 data = fut.result()
258 fut.cancel()
412 def _pipe_closed(self, fut): argument
413 if fut.cancelled():
416 assert fut.result() == b''
420 assert fut is self._read_fut, (fut, self._read_fut)
Dbase_events.py158 def _run_until_complete_cb(fut): argument
159 if not fut.cancelled():
160 exc = fut.exception()
165 futures._get_loop(fut).stop()
197 fut = self._write_ready_fut
198 if fut is None:
200 await fut
/external/libcxx/test/std/thread/futures/futures.async/
Dasync_race.38682.pass.cpp47 std::future<int> fut = std::async(std::launch::async, worker, v); in main() local
48 int answer = fut.get(); in main()
56 std::future<int&> fut = std::async(std::launch::async, worker_ref, std::ref(i)); in main() local
57 int& answer = fut.get(); in main()
65 std::future<void> fut = std::async(std::launch::async, worker_void); in main() local
66 fut.get(); in main()
/external/python/cpython3/Doc/library/
Dasyncio-future.rst131 if not fut.cancelled():
132 fut.set_result(42)
151 # Call 'print("Future:", fut)' when "fut" is done.
152 fut.add_done_callback(
200 async def set_after(fut, delay, value):
204 # Set *value* as a result of *fut* Future.
205 fut.set_result(value)
212 fut = loop.create_future()
219 set_after(fut, 1, '... world'))
223 # Wait until *fut* has a result (1 second) and print it.
[all …]
/external/icu/icu4c/source/data/unit/
Duz.txt68 dnam{"kvadrat fut"}
69 one{"{0} kvadrat fut"}
70 other{"{0} kvadrat fut"}
381 dnam{"fut"}
382 one{"{0} fut"}
383 other{"{0} fut"}
384 per{"{0}/fut"}
649 dnam{"kub fut"}
650 one{"{0} kub fut"}
651 other{"{0} kub fut"}
[all …]
Dtk.txt68 dnam{"inedördül fut"}
69 one{"{0} inedördül fut"}
70 other{"{0} inedördül fut"}
381 dnam{"fut"}
382 one{"{0} fut"}
383 other{"{0} fut"}
384 per{"{0}/fut"}
633 dnam{"akr-fut"}
634 one{"{0} akr-fut"}
635 other{"{0} akr-fut"}
[all …]
Daz.txt68 dnam{"kvadrat fut"}
69 one{"{0} kvadrat fut"}
70 other{"{0} kvadrat fut"}
381 dnam{"fut"}
382 one{"{0} fut"}
383 other{"{0} fut"}
638 dnam{"akr-fut"}
639 one{"{0} akr-fut"}
640 other{"{0} akr-fut"}
654 dnam{"kub fut"}
[all …]
/external/nanohttpd/websocket/src/test/java/fi/iki/elonen/samples/echo/
DSimpleEchoSocket.java87 Future<Void> fut; in onConnect() local
90 fut = session.getRemote().sendStringByFuture(message); in onConnect()
91 fut.get(5, TimeUnit.SECONDS); in onConnect()
/external/python/cpython3/Lib/test/
Dtest_asyncgen.py27 fut = coro.throw(AwaitException)
29 fut = coro.send(None)
33 if fut == ('throw',):
573 fut = asyncio.Future(loop=self.loop)
579 await fut
601 fut.cancel()
777 fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop),
779 self.loop.call_later(delay / 2, lambda: fut.cancel())
780 return await fut
867 fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop),
[all …]
/external/python/cpython3/Lib/distutils/command/
Dbuild_ext.py467 for ext, fut in zip(self.extensions, futures):
469 fut.result()

12