Home
last modified time | relevance | path

Searched refs:fut (Results 1 - 25 of 33) sorted by relevance

12

/third_party/python/Modules/
H A D_asynciomodule.c84 FutureObj_HEAD(fut)
204 get_future_loop(PyObject *fut) in get_future_loop() argument
212 if (Future_CheckExact(fut) || Task_CheckExact(fut)) { in get_future_loop()
213 PyObject *loop = ((FutureObj *)fut)->fut_loop; in get_future_loop()
218 if (_PyObject_LookupAttrId(fut, &PyId_get_loop, &getloop) < 0) { in get_future_loop()
227 return _PyObject_GetAttrId(fut, &PyId__loop); in get_future_loop()
394 future_is_alive(FutureObj *fut) in future_is_alive() argument
396 return fut->fut_loop != NULL; in future_is_alive()
401 future_ensure_alive(FutureObj *fut) in future_ensure_alive() argument
422 future_schedule_callbacks(FutureObj *fut) future_schedule_callbacks() argument
478 future_init(FutureObj *fut, PyObject *loop) future_init() argument
537 future_set_result(FutureObj *fut, PyObject *res) future_set_result() argument
560 future_set_exception(FutureObj *fut, PyObject *exc) future_set_exception() argument
612 create_cancelled_error(FutureObj *fut) create_cancelled_error() argument
631 future_set_cancelled_error(FutureObj *fut) future_set_cancelled_error() argument
642 future_get_result(FutureObj *fut, PyObject **result) future_get_result() argument
675 future_add_done_callback(FutureObj *fut, PyObject *arg, PyObject *ctx) future_add_done_callback() argument
751 future_cancel(FutureObj *fut, PyObject *msg) future_cancel() argument
799 FutureObj_clear(FutureObj *fut) FutureObj_clear() argument
816 FutureObj_traverse(FutureObj *fut, visitproc visit, void *arg) FutureObj_traverse() argument
1171 FutureObj_get_blocking(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_blocking() argument
1182 FutureObj_set_blocking(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored)) FutureObj_set_blocking() argument
1201 FutureObj_get_log_traceback(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_log_traceback() argument
1213 FutureObj_set_log_traceback(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored)) FutureObj_set_log_traceback() argument
1233 FutureObj_get_loop(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_loop() argument
1243 FutureObj_get_callbacks(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_callbacks() argument
1295 FutureObj_get_result(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_result() argument
1306 FutureObj_get_exception(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_exception() argument
1317 FutureObj_get_source_traceback(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_source_traceback() argument
1327 FutureObj_get_cancel_message(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_cancel_message() argument
1337 FutureObj_set_cancel_message(FutureObj *fut, PyObject *msg, void *Py_UNUSED(ignored)) FutureObj_set_cancel_message() argument
1350 FutureObj_get_state(FutureObj *fut, void *Py_UNUSED(ignored)) FutureObj_get_state() argument
1377 FutureObj_repr(FutureObj *fut) FutureObj_repr() argument
1400 FutureObj_finalize(FutureObj *fut) FutureObj_finalize() argument
1534 FutureObj *fut = (FutureObj *)self; FutureObj_dealloc() local
1594 FutureObj *fut = it->future; FutureIter_am_send() local
1763 future_new_iter(PyObject *fut) future_new_iter() argument
2161 FutureObj *fut = (FutureObj*)self; _asyncio_Task__make_cancelled_error_impl() local
2738 FutureObj *fut = (FutureObj*)task; task_step_impl() local
2788 FutureObj *fut = (FutureObj*)result; task_step_impl() local
[all...]
/third_party/python/Lib/test/test_asyncio/
H A Dtest_futures.py174 fut = self.cls.__new__(self.cls, loop=self.loop)
175 self.assertRaises(asyncio.InvalidStateError, fut.result)
177 fut = self.cls.__new__(self.cls, loop=self.loop)
178 self.assertRaises(asyncio.InvalidStateError, fut.exception)
180 fut = self.cls.__new__(self.cls, loop=self.loop)
182 fut.set_result(None)
184 fut = self.cls.__new__(self.cls, loop=self.loop)
186 fut.set_exception(Exception)
188 fut = self.cls.__new__(self.cls, loop=self.loop)
190 fut
620 fut = self._new_future(loop=self.loop) global() variable in BaseFutureTests.test_future_del_collect.Evil
[all...]
H A Dtest_waitfor.py65 fut = loop.create_future()
66 fut.set_result('done')
69 ret = await asyncio.wait_for(fut, 0)
73 self.assertTrue(fut.done())
111 fut = asyncio.create_task(foo())
116 await asyncio.wait_for(fut, timeout)
119 self.assertTrue(fut.done())
121 self.assertTrue(fut.cancelled())
138 fut = asyncio.create_task(foo())
142 await asyncio.wait_for(fut, 0.
[all...]
H A Dtest_tasks.py152 fut = self.new_future(other_loop)
154 async def run(fut):
155 await fut
160 self.loop.run_until_complete(run(fut))
277 fut = asyncio.ensure_future(Aw(coro()), loop=loop)
278 loop.run_until_complete(fut)
279 self.assertEqual(fut.result(), 'ok')
403 async def wait_for(fut):
404 return await fut
406 fut
[all...]
H A Dtest_windows_events.py166 fut = self.loop._proactor.wait_for_handle(event, 0.5)
168 done = self.loop.run_until_complete(fut)
172 self.assertFalse(fut.result())
181 fut = self.loop._proactor.wait_for_handle(event, 10)
183 done = self.loop.run_until_complete(fut)
187 self.assertTrue(fut.result())
192 fut.cancel()
200 fut = self.loop._proactor.wait_for_handle(event, 10)
201 fut.cancel()
204 self.loop.run_until_complete(fut)
[all...]
H A Dtest_base_events.py312 def check_in_thread(loop, event, debug, create_loop, fut):
328 loop.call_soon_threadsafe(fut.set_exception, exc)
330 loop.call_soon_threadsafe(fut.set_result, None)
334 fut = loop.create_future()
336 args = (loop, event, debug, create_loop, fut)
339 loop.run_until_complete(fut)
559 def zero_error(fut):
560 fut.set_result(True)
565 fut = self.loop.create_future()
566 self.loop.call_soon(zero_error, fut)
[all...]
H A Dtest_proactor_events.py52 fut = self.loop.create_future()
53 tr = self.socket_transport(waiter=fut)
55 self.assertIsNone(fut.result())
192 fut = self.loop.create_future()
193 fut.set_result(b'data')
196 tr._write_fut = fut
197 tr._loop_writing(fut)
201 fut = self.loop.create_future()
202 fut.set_result(1)
205 tr._write_fut = fut
[all...]
H A Dtest_runners.py308 fut = runner.get_loop().create_future()
309 runner.run(fut)
411 async def coro(fut):
413 await fut
417 fut = runner.get_loop().create_future()
421 runner.run(coro(fut))
423 self.assertTrue(fut.cancelled())
H A Dtest_threads.py37 fut = asyncio.to_thread(func)
38 futs.append(fut)
H A Dtest_unix_events.py458 self.fut = loop.create_future()
472 self.fut.set_result(None)
475 await self.fut
569 fut = self.loop.create_future()
571 self.loop._sock_sendfile_native_impl(fut, None, sock, fileno,
573 fut.cancel()
575 self.run_loop(fut)
582 fut = self.loop.create_future()
584 self.loop._sock_sendfile_native_impl(fut, None, sock, fileno,
586 fut
[all...]
H A Dtest_ssl.py226 fut = asyncio.Future()
244 self.loop.call_soon_threadsafe(fut.set_exception, ex)
246 self.loop.call_soon_threadsafe(fut.set_result, None)
252 await fut
1074 fut = self._loop.create_task(self._loop.start_tls(
1079 tr = fut.result()
1084 fut.add_done_callback(cb)
1092 fut = asyncio.Future()
1137 self.loop.call_soon_threadsafe(fut.set_exception, ex)
1140 self.loop.call_soon_threadsafe(fut
[all...]
H A Dtest_sendfile.py76 self.fut = loop.create_future()
88 self.fut.set_result(None)
91 await self.fut
510 fut = self.loop.create_future()
513 fut.set_result(None)
517 self.run_loop(fut)
/third_party/python/Lib/asyncio/
H A Dlocks.py106 fut = self._get_loop().create_future()
107 self._waiters.append(fut)
114 await fut
116 self._waiters.remove(fut)
147 fut = next(iter(self._waiters))
154 if not fut.done():
155 fut.set_result(True)
190 for fut in self._waiters:
191 if not fut.done():
192 fut
[all...]
H A Dtasks.py426 async def wait_for(fut, timeout):
442 return await fut
445 fut = ensure_future(fut, loop=loop)
447 if fut.done():
448 return fut.result()
450 await _cancel_and_wait(fut, loop=loop)
452 return fut.result()
460 fut = ensure_future(fut, loo
[all...]
H A Dselector_events.py371 fut = self.create_future()
374 handle = self._add_reader(fd, self._sock_recv, fut, sock, n)
375 fut.add_done_callback(
377 return await fut
379 def _sock_read_done(self, fd, fut, handle=None):
383 def _sock_recv(self, fut, sock, n):
386 if fut.done():
395 fut.set_exception(exc)
397 fut.set_result(data)
412 fut
[all...]
H A Dwindows_events.py128 def _unregister_wait_cb(self, fut):
202 def _unregister_wait_cb(self, fut):
218 super()._unregister_wait_cb(fut)
454 fut = self._loop.create_future()
455 fut.set_result(value)
456 return fut
615 fut = self._loop.create_future()
616 fut.set_result(None)
617 return fut
707 fut
[all...]
H A Dproactor_events.py276 def _loop_reading(self, fut=None):
280 if fut is not None:
281 assert self._read_fut is fut or (self._read_fut is None and
284 if fut.done():
286 length = fut.result()
294 fut.cancel()
443 def _pipe_closed(self, fut):
444 if fut.cancelled():
447 assert fut.result() == b''
451 assert fut i
[all...]
H A Dfutures.py299 def _get_loop(fut):
303 get_loop = fut.get_loop
308 return fut._loop
311 def _set_result_unless_cancelled(fut, result):
313 if fut.cancelled():
315 fut.set_result(result)
H A Dunix_events.py370 fut = self.create_future()
371 self._sock_sendfile_native_impl(fut, None, sock, fileno,
373 return await fut
375 def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno,
384 if fut.cancelled():
391 fut.set_result(total_sent)
398 self._sock_add_cancellation_callback(fut, sock)
399 self.add_writer(fd, self._sock_sendfile_native_impl, fut,
422 fut.set_exception(err)
425 fut
[all...]
/third_party/musl/src/thread/
H A Dpthread_cond_timedwait.c66 volatile int *fut; in __pthread_cond_timedwait() local
78 fut = &c->_c_seq; in __pthread_cond_timedwait()
85 fut = &node.barrier; in __pthread_cond_timedwait()
100 do e = __timedwait_cp(fut, seq, clock, ts, !shared); in __pthread_cond_timedwait()
101 while (*fut==seq && (!e || e==EINTR)); in __pthread_cond_timedwait()
/third_party/musl/porting/linux/user/src/thread/
H A Dpthread_cond_timedwait.c86 volatile int *fut; in __pthread_cond_timedwait() local
98 fut = &c->_c_seq; in __pthread_cond_timedwait()
105 fut = &node.barrier; in __pthread_cond_timedwait()
126 e = __timedwait_cp(fut, seq, clock, ts, !shared); in __pthread_cond_timedwait()
127 } while (*fut==seq && (!e || e==EINTR)); in __pthread_cond_timedwait()
/third_party/rust/crates/syn/tests/
H A Dtest_expr.rs37 let tokens = quote!(fut.await); in test_await()
45 ident: "fut", in test_await()
/third_party/python/Lib/concurrent/futures/
H A D_base.py314 def _result_or_cancel(fut, timeout=None):
317 return fut.result(timeout)
319 fut.cancel()
322 del fut
/third_party/python/Lib/unittest/test/
H A Dtest_async_case.py431 fut = asyncio.ensure_future(coro())
432 self.addAsyncCleanup(self.cleanup, fut)
442 async def cleanup(self, fut):
445 await asyncio.wait([fut])
/third_party/python/Lib/test/
H A Dtest_concurrent_futures.py362 cancelled = [fut for fut in fs if fut.cancelled()]
366 # Use "not fut.cancelled()" instead of "fut.done()" to include futures
368 others = [fut for fut in fs if not fut.cancelled()]
369 for fut in others:
370 self.assertTrue(fut
[all...]

Completed in 22 milliseconds

12