/external/python/cpython3/Lib/asyncio/ |
locks.py | 173 fut = self._loop.create_future() 174 self._waiters.append(fut) 176 yield from fut 180 self._waiters.remove(fut) 196 for fut in self._waiters: 197 if not fut.done(): 198 fut.set_result(True) 240 for fut in self._waiters: 241 if not fut.done(): 242 fut.set_result(True [all...] |
tasks.py | 316 def wait_for(fut, timeout, *, loop=None): 333 return (yield from fut) 339 fut = ensure_future(fut, loop=loop) 340 fut.add_done_callback(cb) 347 fut.remove_done_callback(cb) 348 fut.cancel() 351 if fut.done(): 352 return fut.result() 354 fut.remove_done_callback(cb [all...] |
selector_events.py | 365 fut = self.create_future() 366 self._sock_recv(fut, False, sock, n) 367 return fut 369 def _sock_recv(self, fut, registered, sock, n): 379 if fut.cancelled(): 384 self.add_reader(fd, self._sock_recv, fut, True, sock, n) 386 fut.set_exception(exc) 388 fut.set_result(data) 403 fut = self.create_future() 405 self._sock_sendall(fut, False, sock, data [all...] |
windows_events.py | 119 def _unregister_wait_cb(self, fut): 193 def _unregister_wait_cb(self, fut): 209 super()._unregister_wait_cb(fut) 425 fut = self._loop.create_future() 426 fut.set_result(value) 427 return fut 568 fut = self._wait_for_handle(event, None, True) 571 fut._done_callback = done_callback 572 return fut 723 for address, (fut, ov, obj, callback) in list(self._cache.items()) [all...] |
proactor_events.py | 180 def _loop_reading(self, fut=None): 186 if fut is not None: 187 assert self._read_fut is fut or (self._read_fut is None and 190 data = fut.result() # deliver data later in "finally" clause 319 def _pipe_closed(self, fut): 320 if fut.cancelled(): 323 assert fut.result() == b'' 327 assert fut is self._read_fut, (fut, self._read_fut)
|
futures.py | 343 def _set_result_unless_cancelled(fut, result): 345 if fut.cancelled(): 347 fut.set_result(result)
|
base_events.py | 168 fut = loop.create_future() 169 fut.set_result([info]) 170 return fut 176 def _run_until_complete_cb(fut): 177 exc = fut._exception 183 fut._loop.stop() [all...] |
/external/python/cpython3/Modules/ |
_asynciomodule.c | 56 FutureObj_HEAD(fut) 92 future_schedule_callbacks(FutureObj *fut) 98 if (fut->fut_callbacks == NULL) { 103 len = PyList_GET_SIZE(fut->fut_callbacks); 108 iters = PyList_GetSlice(fut->fut_callbacks, 0, len); 112 if (PyList_SetSlice(fut->fut_callbacks, 0, len, NULL) < 0) { 122 fut->fut_loop, &PyId_call_soon, "OO", cb, fut, NULL); 138 future_init(FutureObj *fut, PyObject *loop) 152 Py_CLEAR(fut->fut_loop) 941 FutureObj *fut = (FutureObj *)self; local 981 FutureObj *fut = it->future; local 1235 PyObject *fut; local 2044 FutureObj *fut = (FutureObj*)result; local [all...] |
/external/python/cpython3/Lib/test/test_asyncio/ |
test_windows_events.py | 114 fut = self.loop._proactor.wait_for_handle(event, 0.5) 116 done = self.loop.run_until_complete(fut) 120 self.assertFalse(fut.result()) 127 fut = self.loop._proactor.wait_for_handle(event, 10) 129 done = self.loop.run_until_complete(fut) 133 self.assertTrue(fut.result()) 138 fut.cancel() 146 fut = self.loop._proactor.wait_for_handle(event, 10) 147 fut.cancel() 150 self.loop.run_until_complete(fut) [all...] |
test_futures.py | 304 fut = self._new_future(loop=self.loop) 307 yield from fut 313 fut.cancel() 317 fut = self._new_future(loop=self.loop) 318 del fut 323 fut = self._new_future(loop=self.loop) 324 fut.set_result(42) 325 del fut 330 fut = self._new_future(loop=self.loop) 331 fut.set_result(42 [all...] |
test_proactor_events.py | 42 fut = asyncio.Future(loop=self.loop) 43 tr = self.socket_transport(waiter=fut) 45 self.assertIsNone(fut.result()) 177 fut = asyncio.Future(loop=self.loop) 178 fut.set_result(b'data') 181 tr._write_fut = fut 182 tr._loop_writing(fut) 186 fut = asyncio.Future(loop=self.loop) 187 fut.set_result(1) 190 tr._write_fut = fut [all...] |
test_tasks.py | 97 fut = self.new_future(other_loop) 100 def run(fut): 101 yield from fut 106 self.loop.run_until_complete(run(fut)) 212 fut = asyncio.ensure_future(Aw(coro()), loop=loop) 213 loop.run_until_complete(fut) 214 assert fut.result() == 'ok' 388 def wait_for(fut): 389 return (yield from fut) 391 fut = self.new_future(self.loop [all...] |
test_base_events.py | 311 def check_in_thread(loop, event, debug, create_loop, fut): 327 loop.call_soon_threadsafe(fut.set_exception, exc) 329 loop.call_soon_threadsafe(fut.set_result, None) 333 fut = asyncio.Future(loop=loop) 335 args = (loop, event, debug, create_loop, fut) 338 loop.run_until_complete(fut) 584 def zero_error(fut): 585 fut.set_result(True) 590 fut = asyncio.Future(loop=self.loop) 591 self.loop.call_soon(zero_error, fut) [all...] |
test_subprocess.py | 471 fut = asyncio.create_subprocess_exec( 476 process = yield from fut
|
test_selector_events.py | 352 fut = self.loop.create_task( 360 fut.cancel() 362 self.loop.run_until_complete(fut) [all...] |
test_events.py | [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
AsynchronousFileChannelTest.java | 210 Future<Integer> fut = afc.read(buf, 0); local 211 assertEquals(4, (int) fut.get()); 219 fut = afc.read(buf, 6); 220 assertEquals(2, (int) fut.get()); 225 fut = afc.read(buf, 8); 226 assertEquals(-1, (int) fut.get()); 228 fut = afc.read(buf, 9); 229 assertEquals(-1, (int) fut.get()); 382 Future<Integer> fut = afc.read(buf, 0); local 384 assertEquals(4, (int) fut.get()) 480 Future<Integer> fut = afc.read(buf, 0); local [all...] |
/external/nanohttpd/websocket/src/test/java/fi/iki/elonen/samples/echo/ |
SimpleEchoSocket.java | 87 Future<Void> fut; local 90 fut = session.getRemote().sendStringByFuture(message); 91 fut.get(5, TimeUnit.SECONDS);
|
/prebuilts/go/darwin-x86/src/cmd/compile/internal/ssa/ |
dom_test.go | 179 // verifyDominators verifies that the dominators of fut (function under test) 181 func verifyDominators(t *testing.T, fut fun, domFn domFunc, doms map[string]string) { 183 for n, b := range fut.blocks { 187 calcDom := domFn(fut.f) 190 nblk, ok := fut.blocks[n] 194 dblk, ok := fut.blocks[d] 216 for _, b := range fut.blocks { 445 func generateDominatorMap(fut fun) map[string]string { 447 for n, b := range fut.blocks { 450 referenceDom := dominatorsSimple(fut.f [all...] |
/prebuilts/go/linux-x86/src/cmd/compile/internal/ssa/ |
dom_test.go | 179 // verifyDominators verifies that the dominators of fut (function under test) 181 func verifyDominators(t *testing.T, fut fun, domFn domFunc, doms map[string]string) { 183 for n, b := range fut.blocks { 187 calcDom := domFn(fut.f) 190 nblk, ok := fut.blocks[n] 194 dblk, ok := fut.blocks[d] 216 for _, b := range fut.blocks { 445 func generateDominatorMap(fut fun) map[string]string { 447 for n, b := range fut.blocks { 450 referenceDom := dominatorsSimple(fut.f [all...] |
/external/python/cpython3/Modules/clinic/ |
_asynciomodule.c.h | 493 "_wakeup($self, /, fut)\n" 501 _asyncio_Task__wakeup_impl(TaskObj *self, PyObject *fut); 507 static const char * const _keywords[] = {"fut", NULL}; 509 PyObject *fut; local 512 &fut)) { 515 return_value = _asyncio_Task__wakeup_impl(self, fut);
|
/external/python/cpython3/Lib/test/ |
test_asyncgen.py | 30 fut = coro.throw(AwaitException) 32 fut = coro.send(None) 36 if fut == ('throw',): 576 fut = asyncio.Future(loop=self.loop) 582 await fut 604 fut.cancel() 780 fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop), 782 self.loop.call_later(delay / 2, lambda: fut.cancel()) 783 return await fut 870 fut = asyncio.ensure_future(asyncio.sleep(delay, loop=self.loop) [all...] |
test_concurrent_futures.py | 486 for fut in futures: 487 self.assertRaises(BrokenProcessPool, fut.result)
|
test_types.py | [all...] |
/external/python/cpython3/Lib/distutils/command/ |
build_ext.py | 466 for ext, fut in zip(self.extensions, futures): 468 fut.result()
|