Home
last modified time | relevance | path

Searched refs:spawn (Results 1 – 25 of 168) sorted by relevance

1234567

/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dprocess.rs29 let handle = ylong_runtime::spawn(async { in sdv_process_output_test()
48 let handle = ylong_runtime::spawn(async { in sdv_process_status_test()
66 let handle = ylong_runtime::spawn(async { in sdv_process_spawn_test()
92 let handle = ylong_runtime::spawn(async { in sdv_process_child_stdio_test()
97 .spawn() in sdv_process_child_stdio_test()
140 let handle = ylong_runtime::spawn(async { in sdv_process_kill_test()
158 let handle = ylong_runtime::spawn(async { in sdv_process_try_wait_test()
181 let handle = ylong_runtime::spawn(async { in sdv_process_drop_test()
184 let child = command.spawn(); in sdv_process_drop_test()
190 let child = command.spawn(); in sdv_process_drop_test()
[all …]
H A Dsync.rs72 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex1()
80 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex1()
88 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex1()
96 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex1()
104 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex1()
127 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex2()
152 ylong_runtime::spawn(async move { in sdv_concurrency_with_mutex3()
196 handlers2.push(ylong_runtime::spawn( in sdv_concurrency_with_mutex4()
231 let producer_thread = thread::spawn(move || { in sdv_rwlock_multi_threads()
444 let handle = ylong_runtime::spawn(async move { in sdv_waiter_with_wake_one()
[all …]
H A Dasync_pool.rs131 runtime.spawn(test_future(1)), in sdv_async_pool_001()
132 runtime.spawn(test_multi_future(1, 2)), in sdv_async_pool_001()
133 runtime.spawn(test_nested_future(1, 2)), in sdv_async_pool_001()
191 runtime.spawn(test_future(1)), in sdv_async_pool_002()
192 runtime.spawn(test_multi_future(1, 2)), in sdv_async_pool_002()
251 runtime.spawn(test_future(1)), in sdv_async_pool_003()
311 runtime.spawn(test_future(1)), in sdv_async_pool_004()
371 runtime.spawn(test_future(1)), in sdv_async_pool_005()
431 runtime.spawn(test_future(1)), in sdv_async_pool_006()
491 runtime.spawn(test_future(1)), in sdv_async_pool_007()
[all …]
H A Dsignal.rs50 let handle = ylong_runtime::spawn(async move { in sdv_signal_recv_test()
94 let handle = ylong_runtime::spawn(async move { in sdv_signal_poll_recv_test()
136 let handle = ylong_runtime::spawn(async move { in sdv_signal_alarm()
151 let handle = ylong_runtime::spawn(async move { in sdv_signal_child()
166 let handle = ylong_runtime::spawn(async move { in sdv_signal_hangup()
181 let handle = ylong_runtime::spawn(async move { in sdv_signal_interrupt()
196 let handle = ylong_runtime::spawn(async move { in sdv_signal_io()
211 let handle = ylong_runtime::spawn(async move { in sdv_signal_pipe()
226 let handle = ylong_runtime::spawn(async move { in sdv_signal_terminate()
241 let handle = ylong_runtime::spawn(async move { in sdv_signal_user_defined1()
[all …]
H A Dblock_on.rs64 runtime.spawn(async { 1 + 2 }).await.unwrap() in sdv_block_on_nest_spawn()
69 runtime.spawn(async { 1 + 2 }).await.unwrap() in sdv_block_on_nest_spawn()
81 .spawn(async { in sdv_block_on_nest_spawn_spawn_blocking()
111 .spawn(async { in sdv_block_on_nest_spawn_and_spawn()
124 .spawn(async { in sdv_block_on_nest_spawn_and_spawn()
152 .spawn(async { in sdv_block_on_nest_spawn_nest_spawn()
154 runtime.spawn(async { 7 }).await.unwrap() in sdv_block_on_nest_spawn_nest_spawn()
159 .spawn(async { in sdv_block_on_nest_spawn_nest_spawn()
186 .spawn(async { in sdv_block_on_nest_spawn_nest_spawn2()
209 .spawn(async { in sdv_block_on_nest_batch_spawn()
[all …]
H A Djoin_set.rs39 set.spawn(async move { 1 }); in sdv_join_set_spawn_simple()
76 set.spawn(TestFuture::default()); in sdv_join_set_spawn_pending()
96 let handle = ylong_runtime::spawn(async move { in sdv_join_set_spawn_io()
97 set.spawn(async move { in sdv_join_set_spawn_io()
108 set.spawn(async move { in sdv_join_set_spawn_io()
140 set.spawn(TestFuture::default()); in sdv_join_set_spawn_multiple()
166 set.spawn(async move { in sdv_join_set_join_all()
193 let handle = set.spawn(async move { in sdv_join_set_cancel_one()
221 set.spawn(async move { in sdv_join_set_cancel_all()
273 set.spawn(async move { in sdv_join_set_shutdown()
[all …]
H A Dmpsc_test.rs30 let handle = ylong_runtime::spawn(async move { in sdv_unbounded_send_recv_test()
50 let handle = ylong_runtime::spawn(async move { in sdv_unbounded_send_recv_drop_test()
85 let handle = ylong_runtime::spawn(async move { in sdv_unbounded_send_recv_timeout_test()
105 let handle = ylong_runtime::spawn(async move { in sdv_bounded_send_recv_test()
111 ylong_runtime::spawn(async move { in sdv_bounded_send_recv_test()
127 let handle = ylong_runtime::spawn(async move { in sdv_bounded_send_recv_drop_test()
132 ylong_runtime::spawn(async move { in sdv_bounded_send_recv_drop_test()
169 let handle = ylong_runtime::spawn(async move { in sdv_bounded_send_timeout_recv_timeout_test()
280 tasks.push(ylong_runtime::spawn(async move { in sdv_multi_send_recv_test()
285 let handle = ylong_runtime::spawn(async move { in sdv_multi_send_recv_test()
[all …]
H A Dselect.rs36 let handle = ylong_runtime::spawn(async { in sdv_new_select_basic()
68 let handle = ylong_runtime::spawn(async { in sdv_new_select_channel()
72 ylong_runtime::spawn(async move { in sdv_new_select_channel()
76 ylong_runtime::spawn(async move { in sdv_new_select_channel()
105 let handle = ylong_runtime::spawn(async { in sdv_new_select_biased()
158 let handle = ylong_runtime::spawn(async { in sdv_new_select_match()
197 let handle = ylong_runtime::spawn(async { in sdv_new_select_precondition()
222 let handle = ylong_runtime::spawn(async { in sdv_new_select_panic()
H A Dtcp_test.rs30 let handle = ylong_runtime::spawn(async move { in sdv_tcp_ipv6_connect()
34 let handle = ylong_runtime::spawn(async move { in sdv_tcp_ipv6_connect()
61 let handle = ylong_runtime::spawn(async { in sdv_tcp_listener_interface()
81 let handle = ylong_runtime::spawn(async move { in sdv_tcp_stream_try()
116 let handle = ylong_runtime::spawn(async move { in sdv_tcp_stream_basic()
163 let handle = ylong_runtime::spawn(async { in sdv_tcp_stream_peek()
191 let handle = ylong_runtime::spawn(async move { in sdv_tcp_global_runtime()
255 let client = runtime.spawn(async move { in sdv_tcp_multi_runtime()
291 let handle = ylong_runtime::spawn(async { in sdv_tcp_split_borrow_half()
467 let server = ylong_runtime::spawn(async { in sdv_tcp_cancel()
[all …]
H A Dspawn.rs36 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_one_core_test()
53 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_two_core_test()
70 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_three_core_test()
87 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_four_core_test()
104 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_eight_core_test()
121 handles.push(ylong_runtime::spawn(test_future(i))); in sdv_max_core_test()
138 handles.push(ylong_runtime::spawn(test_multi_future_in_async(i, i + 1))); in sdv_multi_future_in_async()
156 handles.push(ylong_runtime::spawn(test_async_in_async(i, i + 1))); in sdv_multi_async_in_async()
H A Dasync_buf_read.rs32 let server = ylong_runtime::spawn(async move { in sdv_buf_reader_read_until()
48 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_read_until()
76 let server = ylong_runtime::spawn(async move { in sdv_buf_reader_read_line()
90 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_read_line()
117 let server = ylong_runtime::spawn(async move { in sdv_buf_reader_split()
129 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_split()
156 let server = ylong_runtime::spawn(async move { in sdv_buf_reader_lines()
177 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_lines()
207 let handle = ylong_runtime::spawn(async move { in sdv_buf_reader_seek()
259 let server = ylong_runtime::spawn(async move { in sdv_buf_reader_read()
[all …]
H A Dsingleton_runtime.rs47 let thread_handler = std::thread::spawn(move || { in sdv_concurrently_runtime_spawn_async_in_async_task()
50 handles.push(ylong_runtime::spawn(test_async_in_async(i, i + 1))); in sdv_concurrently_runtime_spawn_async_in_async_task()
75 let thread_handler = std::thread::spawn(move || { in sdv_concurrently_spawn_async_in_async_task()
78 handles.push(ylong_runtime::spawn(test_async_in_async(i, i + 1))); in sdv_concurrently_spawn_async_in_async_task()
103 let thread_handler = std::thread::spawn(move || { in sdv_concurrently_task_builder_spawn_async_in_async_task()
107 handles.push(task_builder.spawn(test_async_in_async(i, i + 1))); in sdv_concurrently_task_builder_spawn_async_in_async_task()
146 let _ = ylong_runtime::block_on(ylong_runtime::spawn(async move { 1 })); in sdv_build_global_failed()
H A Dudp_test.rs31 let handle = ylong_runtime::spawn(async { in sdv_udp_send_recv()
69 let handle = ylong_runtime::spawn(async { in sdv_udp_send_to_recv_from()
99 let handle = ylong_runtime::spawn(async move { in sdv_udp_recv()
113 let handle = thread::spawn(move || { in sdv_udp_recv()
143 let handle = ylong_runtime::spawn(async move { in sdv_udp_try_recv_from()
180 let handle = ylong_runtime::spawn(async move { in sdv_udp_try_send()
202 let handle = ylong_runtime::spawn(async move { in sdv_udp_try_recv()
273 let handle = ylong_runtime::spawn(async move { in sdv_udp_send_recv_poll()
314 let handle = ylong_runtime::spawn(async move { in sdv_send_to_peek_from()
348 let handle = ylong_runtime::spawn(async { in sdv_send_to_try_peek_from()
[all …]
H A Dasync_fs.rs31 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_write()
40 let handle1 = ylong_runtime::spawn(async move { in sdv_async_fs_write()
60 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_read()
75 let handle2 = ylong_runtime::spawn(async move { in sdv_async_fs_read()
95 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_rw()
100 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_rw()
120 let handle2 = ylong_runtime::spawn(async move { in sdv_async_fs_rw()
163 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_read_to_end()
189 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_seek()
252 let handle = ylong_runtime::spawn(async move { in sdv_async_fs_set_permission()
[all …]
H A Dtask_cancel.rs34 let handle = ylong_runtime::spawn(async move { in sdv_task_cancel_simple()
35 let task = ylong_runtime::spawn(async move { in sdv_task_cancel_simple()
56 let handle = ylong_runtime::spawn(async move { in sdv_task_cancel_failed()
57 let task = ylong_runtime::spawn(async move { 1 }); in sdv_task_cancel_failed()
95 let handle = ylong_runtime::spawn(async move { in sdv_task_cancel_multiple()
H A Dasync_buf_write.rs30 let server = ylong_runtime::spawn(async move { in sdv_buf_writer_write()
41 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write()
69 let server = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored()
80 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored()
116 let handle = ylong_runtime::spawn(async move { in sdv_buf_writer_seek()
125 let handle1 = ylong_runtime::spawn(async move { in sdv_buf_writer_seek()
165 let server = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored_2()
176 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored_2()
205 let handle = ylong_runtime::spawn(async { in sdv_buf_writer_stdio_write()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/
H A Dylong_runtime_async_benchmark.rs61 let handle1 = runtime.spawn(async move { in main()
65 let handle2 = runtime.spawn(async move { in main()
69 let handle3 = runtime.spawn(async move { in main()
73 let handle4 = runtime.spawn(async move { in main()
77 let handle5 = runtime.spawn(async move { in main()
81 let handle6 = runtime.spawn(async move { in main()
85 let handle7 = runtime.spawn(async move { in main()
89 let handle8 = runtime.spawn(async move { in main()
93 let handle9 = runtime.spawn(async move { in main()
97 let handle10 = runtime.spawn(async move { in main()
H A Dylong_tokio_tcp_perf.rs36 let handle = runtime.spawn(async move { in ylong_create_client()
73 let handle = runtime.spawn(async move { in tokio_create_client()
112 thread::spawn(ylong_create_client); in main()
113 let handle = runtime.spawn(async move { in main()
156 thread::spawn(tokio_create_client); in main()
157 let handle = runtime.spawn(async move { in main()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/
H A Dylong_tokio_rwlock.rs57 handlers.push(rt.spawn(tokio_rwlock_task(lock.clone()))); in tokio_rwlock_read()
74 let handle = ylong_runtime::spawn(async move {}); in ylong_rwlock_read()
82 handlers.push(ylong_runtime::spawn(ylong_rwlock_task(lock.clone()))); in ylong_rwlock_read()
106 handlers.push(rt.spawn(tokio_rwlock_write_task(lock.clone()))); in tokio_rwlock_write()
123 let handle = ylong_runtime::spawn(async move {}); in ylong_rwlock_write()
131 handlers.push(ylong_runtime::spawn(ylong_rwlock_write_task(lock.clone()))); in ylong_rwlock_write()
158 handlers.push(rt.spawn(tokio_rwlock_write_task(lock_in))); in tokio_rwlock_write_read()
163 handlers.push(rt.spawn(tokio_rwlock_task(lock_in))); in tokio_rwlock_write_read()
180 let handle = ylong_runtime::spawn(async move {}); in ylong_rwlock_write_read()
190 handlers.push(ylong_runtime::spawn(ylong_rwlock_write_task(lock_in))); in ylong_rwlock_write_read()
[all …]
H A Dylong_tokio_task_creation.rs31 handlers.push(runtime.spawn(async move { 1 }));
47 handlers.push(ylong_runtime::spawn(async move { 1 }));
61 let handle = runtime.spawn(async move {
64 handlers.push(tokio::spawn(async move { 1 }));
80 let handle = ylong_runtime::spawn(async move {
83 handlers.push(ylong_runtime::spawn(async move { 1 }));
H A Dylong_tokio_multi_threaded.rs32 runtime.spawn(async move {
38 runtime.spawn(async move {
99 runtime.spawn(async move { iter(runtime_clone, sender, n - 1) }); in chained_spawn()
111 runtime_clone.spawn(async move { iter(runtime_iter_clone, sender, TASK_NUM) }); in chained_spawn()
142 tokio::spawn(async move { iter(sender, n - 1) }); in chained_spawn()
152 tokio::spawn(async move { iter(sender, TASK_NUM) }); in chained_spawn()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/process/
H A Dcommand.rs333 let mut child = self.std.spawn()?; in spawn()
382 let child = self.spawn(); in output()
409 let child = self.spawn(); in status()
620 let handle = crate::spawn(async { in ut_process_output_test()
639 let handle = crate::spawn(async { in ut_process_status_test()
658 let handle = crate::spawn(async { in ut_process_child_stdio_test()
663 .spawn() in ut_process_child_stdio_test()
710 let handle = crate::spawn(async { in ut_process_kill_test()
728 let handle = crate::spawn(async { in ut_process_drop_test()
731 let child = command.spawn(); in ut_process_drop_test()
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/signal/unix/
H A Dmod.rs453 handles.push(crate::spawn(async move { in ut_signal_recv_and_poll_recv()
458 handles.push(crate::spawn(async move { in ut_signal_recv_and_poll_recv()
472 let handle = crate::spawn(async move { in ut_signal_alarm()
487 let handle = crate::spawn(async move { in ut_signal_child()
502 let handle = crate::spawn(async move { in ut_signal_hangup()
517 let handle = crate::spawn(async move { in ut_signal_interrupt()
532 let handle = crate::spawn(async move { in ut_signal_io()
547 let handle = crate::spawn(async move { in ut_signal_pipe()
562 let handle = crate::spawn(async move { in ut_signal_terminate()
577 let handle = crate::spawn(async move { in ut_signal_user_defined1()
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/docs/
H A Duser_guide.md18 可以链式设置runtime的具体配置。必须在`block_on`,`spawn`之前设置,否则`runtime`会使用默认配置。 相关接口位于`ylong_runtime::builder`.
36 通过``spawn``生成异步任务
40 let handle = ylong_runtime::spawn(async move {
42 let handle = ylong_runtime::spawn(async move {
85 let handle = ylong_runtime::spawn(async move {
86 let task = ylong_runtime::spawn(async move {
107 let handle = ylong_runtime::spawn(async move {
140 let handle = ylong_runtime::spawn(async move {
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/
H A Dylong_runtime_timer_sleep.rs21 use ylong_runtime::{block_on, spawn};
26 let handle_one = spawn(async { in main()
31 let handle_two = spawn(async { in main()
36 let handle_three = spawn(async { in main()

1234567