| /external/python/cpython3/Lib/test/test_asyncio/ |
| D | test_taskgroups.py | 31 async def test_taskgroup_01(self): 33 async def foo1(): 37 async def foo2(): 41 async with taskgroups.TaskGroup() as g: 48 async def test_taskgroup_02(self): 50 async def foo1(): 54 async def foo2(): 58 async with taskgroups.TaskGroup() as g: 66 async def test_taskgroup_03(self): 68 async def foo1(): [all …]
|
| D | test_timeouts.py | 16 async def test_timeout_basic(self): 18 async with asyncio.timeout(0.01) as cm: 22 async def test_timeout_at_basic(self): 27 async with asyncio.timeout_at(deadline) as cm: 32 async def test_nested_timeouts(self): 37 async with asyncio.timeout_at(deadline) as cm1: 40 async with asyncio.timeout_at(deadline) as cm2: 49 async def test_waiter_cancelled(self): 53 async with asyncio.timeout(0.01): 61 async def test_timeout_not_called(self): [all …]
|
| D | test_locks.py | 28 async def test_repr(self): 37 async def test_lock(self): 48 async def test_lock_doesnt_accept_loop_parameter(self): 67 async def test_lock_by_with_statement(self): 86 async def test_acquire(self): 92 async def c1(result): 97 async def c2(result): 102 async def c3(result): 137 async def test_acquire_cancel(self): 147 async def test_cancel_race(self): [all …]
|
| D | test_waitfor.py | 23 async def run(self): 41 async def test_asyncio_wait_for_cancelled(self): 52 async def test_asyncio_wait_for_timeout(self): 62 async def test_wait_for_timeout_less_then_0_or_0_future_done(self): 76 async def test_wait_for_timeout_less_then_0_or_0_coroutine_do_not_started(self): 81 async def foo(): 93 async def test_wait_for_timeout_less_then_0_or_0(self): 101 async def foo(): 125 async def test_wait_for(self): 129 async def foo(): [all …]
|
| /external/rust/crates/tokio/tests/ |
| D | macros_select.rs | 17 async fn sync_one_lit_expr_comma() { in sync_one_lit_expr_comma() 19 foo = async { 1 } => foo, in sync_one_lit_expr_comma() 26 async fn nested_one() { in nested_one() 28 foo = async { 1 } => tokio::select! { in nested_one() 29 bar = async { foo } => bar, in nested_one() 37 async fn sync_one_lit_expr_no_comma() { in sync_one_lit_expr_no_comma() 39 foo = async { 1 } => foo in sync_one_lit_expr_no_comma() 46 async fn sync_one_lit_expr_block() { in sync_one_lit_expr_block() 48 foo = async { 1 } => { foo } in sync_one_lit_expr_block() 55 async fn sync_one_await() { in sync_one_await() [all …]
|
| D | task_local_set.rs | 25 async fn local_current_thread_scheduler() { in local_current_thread_scheduler() 27 .run_until(async { in local_current_thread_scheduler() 28 task::spawn_local(async {}).await.unwrap(); in local_current_thread_scheduler() 35 async fn local_threadpool() { in local_threadpool() 43 .run_until(async { in local_threadpool() 45 task::spawn_local(async { in local_threadpool() 56 async fn localset_future_threadpool() { in localset_future_threadpool() 64 local.spawn_local(async move { in localset_future_threadpool() 72 async fn localset_future_timers() { in localset_future_timers() 77 local.spawn_local(async move { in localset_future_timers() [all …]
|
| /external/python/cpython3/Lib/test/ |
| D | test_coroutines.py | 32 async def asynciter(iterable): 89 """async def foo(): 93 """async def foo(): 97 """async def foo(a=await something()): 101 """async def foo(a:await something()): 105 """async def foo(): 107 [i async for i in els] 110 """async def foo(): 115 """async def foo(): 118 async for b in els] [all …]
|
| D | test_contextlib_async.py | 15 """Decorator to turn an async function into a test case.""" 29 async def test_enter(self): 31 async def __aexit__(self, *args): 37 async with manager as context: 41 async def test_async_gen_propagates_generator_exit(self): 45 async def ctx(): 48 async def gen(): 49 async with ctx(): 55 async with ctx(): 56 async for val in gen(): [all …]
|
| D | test_asyncgen.py | 45 async def iterate(): 47 async for i in gen: 66 raise TypeError(f'{iterator!r} is not an async iterator') 71 async def anext_impl(): 88 code = '''async def foo(): 93 with self.assertRaisesRegex(SyntaxError, 'yield from.*inside async'): 97 code = '''async def foo(): 101 with self.assertRaisesRegex(SyntaxError, 'yield from.*inside async'): 105 code = '''async def foo(): 111 with self.assertRaisesRegex(SyntaxError, 'return.*value.*async gen'): [all …]
|
| /external/rust/crates/maybe-async/ |
| D | README.md | 1 # maybe-async 3 **Why bother writing similar code twice for blocking and async code?** 5 …ps://github.com/fMeow/maybe-async-rs/workflows/CI%20%28Linux%29/badge.svg?branch=main)](https://gi… 7 …test Version](https://img.shields.io/crates/v/maybe-async.svg)](https://crates.io/crates/maybe-asy… 8 [](https://docs.rs/maybe-async) 10 When implementing both sync and async versions of API in a crate, most API 11 of the two version are almost the same except for some async/await keyword. 13 `maybe-async` help unifying async and sync implementation by **procedural 15 - Write async code with normal `async`, `await`, and let `maybe_async` 17 those `async` and `await` when you need a blocking code. [all …]
|
| D | CHANGELOG.md | 5 ### [0.2.10](https://github.com/fMeow/maybe-async-rs/compare/v0.2.9...v0.2.10) (2024-02-22) 7 ### [0.2.9](https://github.com/fMeow/maybe-async-rs/compare/v0.2.8...v0.2.9) (2024-01-31) 12 * support `async fn` in traits ([282eb76](https://github.com/fMeow/maybe-async-rs/commit/282eb76c0b… 14 ### [0.2.8](https://github.com/fMeow/maybe-async-rs/compare/v0.2.7...v0.2.8) (2024-01-30) 16 ### [0.2.7](https://github.com/fMeow/maybe-async-rs/compare/v0.2.6...v0.2.7) (2023-02-01) 21 * allow `maybe_async` on static ([a08b112](https://github.com/fMeow/maybe-async-rs/commit/a08b11218… 26 * applying to pub(crate) trait fail ([8cf762f](https://github.com/fMeow/maybe-async-rs/commit/8cf76… 28 ### [0.2.6](https://github.com/guoli-lyu/maybe-async-rs/compare/v0.2.4...v0.2.6) (2021-05-28) 33 * remove async test if condition not match ([0089daa](https://github.com/guoli-lyu/maybe-async-rs/c… 34 * test is removed when is_sync ([377815a](https://github.com/guoli-lyu/maybe-async-rs/commit/377815… [all …]
|
| /external/rust/crates/async-trait/tests/ |
| D | test.rs | 28 async fn selfvalue(self) in selfvalue() 34 async fn selfref(&self) {} in selfref() 36 async fn selfmut(&mut self) {} in selfmut() 38 async fn required() -> Self::Assoc; in required() 40 async fn elided_lifetime(_x: &str) {} in elided_lifetime() 42 async fn explicit_lifetime<'a>(_x: &'a str) {} in explicit_lifetime() 44 async fn generic_type_param<T: Send>(x: Box<T>) -> T { in generic_type_param() 48 async fn calls(&self) { in calls() 54 async fn calls_mut(&mut self) { in calls_mut() 65 async fn selfvalue(self) {} in selfvalue() [all …]
|
| /external/rust/crates/maybe-async/src/ |
| D | lib.rs | 1 //! **Why bother writing similar code twice for blocking and async code?** 3 …ps://github.com/fMeow/maybe-async-rs/workflows/CI%20%28Linux%29/badge.svg?branch=main)](https://gi… 5 …test Version](https://img.shields.io/crates/v/maybe-async.svg)](https://crates.io/crates/maybe-asy… 6 //! [](https://docs.rs/maybe-async) 8 //! When implementing both sync and async versions of API in a crate, most API 9 //! of the two version are almost the same except for some async/await keyword. 11 //! `maybe-async` help unifying async and sync implementation by **procedural 13 //! - Write async code with normal `async`, `await`, and let `maybe_async` 15 //! those `async` and `await` when you need a blocking code. 16 //! - Switch between sync and async by toggling `is_sync` feature gate in [all …]
|
| /external/rust/crates/async-trait/ |
| D | README.md | 1 Async trait methods 4 …ge/github-dtolnay/async--trait-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="2… 5 …img.shields.io/crates/v/async-trait.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](… 6 …ields.io/badge/docs.rs-async--trait-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" hei… 7 …s/workflow/status/dtolnay/async-trait/ci.yml?branch=master&style=for-the-badge" height="20">](http… 9 The initial round of stabilizations for the async/await language feature in Rust 10 1.39 did not include support for async fn in traits. Trying to include an async 15 async fn f() {} 20 error[E0706]: trait fns cannot be declared `async` 23 4 | async fn f() {} [all …]
|
| /external/rust/crates/maybe-async/tests/ui/ |
| D | 02-must-be-async.rs | 7 async fn declare_async(&self); in declare_async() 9 async fn async_fn(&self) { in async_fn() 16 async fn declare_async_not_send(&self); in declare_async_not_send() 18 async fn async_fn_not_send(&self) { in async_fn_not_send() 27 async fn declare_async(&self); in declare_async() 29 async fn async_fn(&self) { in async_fn() 38 async fn declare_async(&self); in declare_async() 40 async fn async_fn(&self) { in async_fn() 49 async fn declare_async_afit(&self); in declare_async_afit() 51 async fn async_fn_afit(&self) { in async_fn_afit() [all …]
|
| D | 01-maybe-async.rs | 9 async fn declare_async(&self); in declare_async() 11 async fn async_fn(&self) { in async_fn() 20 async fn declare_async(&self); in declare_async() 22 async fn async_fn(&self) { in async_fn() 31 async fn declare_async(&self); in declare_async() 33 async fn async_fn(&self) { in async_fn() 42 async fn declare_async_afit(&self); in declare_async_afit() 44 async fn async_fn_afit(&self) { in async_fn_afit() 50 async fn async_fn() {} in async_fn() 53 pub async fn pub_async_fn() {} in pub_async_fn() [all …]
|
| /external/mockito/src/test/java/org/mockitousage/verification/ |
| D | VerificationWithAfterTest.java | 21 import org.mockitoutil.async.AsyncTesting; 42 private AsyncTesting async = new AsyncTesting(); field in VerificationWithAfterTest 46 async.cleanUp(); in tearDown() 52 async.runAfter(10, callMock); in should_verify_with_after() 53 async.runAfter(1000, callMock); in should_verify_with_after() 62 async.runAfter(10, callMock); in should_verify_with_after_and_fail() 63 async.runAfter(40, callMock); in should_verify_with_after_and_fail() 77 async.runAfter(10, callMock); in should_verify_with_time_x() 78 async.runAfter(50, callMock); in should_verify_with_time_x() 79 async.runAfter(600, callMock); in should_verify_with_time_x() [all …]
|
| D | VerificationInOrderWithTimeoutTest.java | 20 import org.mockitoutil.async.AsyncTesting; 34 private AsyncTesting async; field in VerificationInOrderWithTimeoutTest 37 async = new AsyncTesting(); in setUp() 41 async.cleanUp(); in tearDown() 58 async.runAfter(20, callMock(mock1, 'a')); in should_verify_in_order_with_timeout() 59 async.runAfter(50, callMock(mock1, 'c')); in should_verify_in_order_with_timeout() 60 async.runAfter(200, callMock(mock2, 'b')); in should_verify_in_order_with_timeout() 71 async.runAfter(20, callMock(mock1, 'a')); in should_verify_in_order_with_timeout_and_fail() 72 async.runAfter(100, callMock(mock2, 'b')); in should_verify_in_order_with_timeout_and_fail() 89 async.runAfter(20, callMock(mock1, 'a')); in should_verify_in_order_with_times_x() [all …]
|
| /external/grpc-grpc/src/python/grpcio_tests/tests_aio/unit/ |
| D | server_test.py | 111 async def _unary_unary(unused_request, unused_context): 114 async def _block_forever(self, unused_request, unused_context): 117 async def _block_briefly(self, unused_request, unused_context): 121 async def _unary_stream_async_gen(self, unused_request, unused_context): 125 async def _unary_stream_reader_writer(self, unused_request, context): 129 async def _unary_stream_evilly_mixed(self, unused_request, context): 134 async def _stream_unary_async_gen(self, request_iterator, unused_context): 136 async for request in request_iterator: 142 async def _stream_unary_reader_writer(self, unused_request, context): 147 async def _stream_unary_evilly_mixed(self, request_iterator, context): [all …]
|
| D | client_unary_unary_interceptor_test.py | 39 async def setUp(self): 42 async def tearDown(self): 52 async def test_executed_right_order(self): 58 async def intercept_unary_unary( 67 async with aio.insecure_channel( 96 async def test_status_code_Ok(self): 103 async def intercept_unary_unary( 115 async with aio.insecure_channel( 129 async def test_add_timeout(self): 133 async def intercept_unary_unary( [all …]
|
| /external/python/cpython3/Lib/unittest/test/ |
| D | test_async_case.py | 22 async def __aenter__(self): 26 async def __aexit__(self, *exc_info): 33 async def __aexit__(self, *exc_info): 36 async def __aenter__(self): 71 async def asyncSetUp(self): 78 async def test_func(self): 85 async def asyncTearDown(self): 102 async def on_cleanup2(self): 112 async def on_cleanup4(self): 122 async def on_cleanup6(self): [all …]
|
| /external/rust/crates/async-trait/src/ |
| D | lib.rs | 1 …//github.com/dtolnay/async-trait) [![crates-io]](https://crates.io/crates/async-trait) [… 9 //! <h5>Type erasure for async trait methods</h5> 11 //! The initial round of stabilizations for the async/await language feature in 12 //! Rust 1.39 did not include support for async fn in traits. Trying to include 13 //! an async fn in a trait produces the following error: 18 //! async fn f() {} 23 //! error[E0706]: trait fns cannot be declared `async` 26 //! 4 | async fn f() {} 30 //! This crate provides an attribute macro to make async fn in traits work. 32 //! Please refer to [*why async fn in traits are hard*][hard] for a deeper [all …]
|
| /external/rust/crates/axum/src/routing/tests/ |
| D | mod.rs | 46 async fn hello_world() { in hello_world() 47 async fn root(_: Request<Body>) -> &'static str { in hello_world() 51 async fn foo(_: Request<Body>) -> &'static str { in hello_world() 55 async fn users_create(_: Request<Body>) -> &'static str { in hello_world() 79 async fn routing() { in routing() 83 get(|_: Request<Body>| async { "users#index" }) in routing() 84 .post(|_: Request<Body>| async { "users#create" }), in routing() 86 .route("/users/:id", get(|_: Request<Body>| async { "users#show" })) in routing() 89 get(|_: Request<Body>| async { "users#action" }), in routing() 115 async fn router_type_doesnt_change() { in router_type_doesnt_change() [all …]
|
| /external/python/pyee/tests/ |
| D | test_trio.py | 15 async def test_trio_emit(): 20 async with TrioEventEmitter() as ee: 25 async def event_handler(): 39 async def test_trio_once_emit(): 44 async with TrioEventEmitter() as ee: 48 async def event_handler(): 62 async def test_trio_error(): 67 async with TrioEventEmitter() as ee: 71 async def event_handler(): 75 async def handle_error(exc): [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/ |
| D | AwaitTest.kt | 14 val d = async { in <lambda>() 19 val d2 = async { in <lambda>() 39 val d = async(start = CoroutineStart.LAZY) { in <lambda>() 43 val d2 = async(start = CoroutineStart.LAZY) { in <lambda>() 53 val d1 = async { 1L } in <lambda>() 54 val d2 = async { "" } in <lambda>() 55 val d3 = async { } in <lambda>() 65 val d = async { in <lambda>() 70 val d2 = async(NonCancellable) { in <lambda>() 75 val d3 = async { in <lambda>() [all …]
|