Home
last modified time | relevance | path

Searched refs:fibers (Results 1 – 25 of 204) sorted by relevance

123456789

/third_party/boost/libs/fiber/test/
Dtest_unbuffered_channel_dispatch.cpp49 boost::fibers::unbuffered_channel< int > c; in test_push()
50 boost::fibers::fiber f( boost::fibers::launch::dispatch, [&c](){ in test_push()
51 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_push()
54 BOOST_CHECK( boost::fibers::channel_op_status::success == c.pop( value) ); in test_push()
60 boost::fibers::unbuffered_channel< int > c; in test_push_closed()
62 BOOST_CHECK( boost::fibers::channel_op_status::closed == c.push( 1) ); in test_push_closed()
67 boost::fibers::unbuffered_channel< int > c; in test_push_wait_for()
68 boost::fibers::fiber f( boost::fibers::launch::dispatch, [&c](){ in test_push_wait_for()
69 …BOOST_CHECK( boost::fibers::channel_op_status::success == c.push_wait_for( 1, std::chrono::seconds… in test_push_wait_for()
72 BOOST_CHECK( boost::fibers::channel_op_status::success == c.pop( value) ); in test_push_wait_for()
[all …]
Dtest_unbuffered_channel_post.cpp49 boost::fibers::unbuffered_channel< int > c; in test_push()
50 boost::fibers::fiber f( boost::fibers::launch::post, [&c](){ in test_push()
51 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_push()
54 BOOST_CHECK( boost::fibers::channel_op_status::success == c.pop( value) ); in test_push()
60 boost::fibers::unbuffered_channel< int > c; in test_push_closed()
62 BOOST_CHECK( boost::fibers::channel_op_status::closed == c.push( 1) ); in test_push_closed()
67 boost::fibers::unbuffered_channel< int > c; in test_push_wait_for()
68 boost::fibers::fiber f( boost::fibers::launch::post, [&c](){ in test_push_wait_for()
69 …BOOST_CHECK( boost::fibers::channel_op_status::success == c.push_wait_for( 1, std::chrono::seconds… in test_push_wait_for()
72 BOOST_CHECK( boost::fibers::channel_op_status::success == c.pop( value) ); in test_push_wait_for()
[all …]
Dtest_future_post.cpp41 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
47 boost::fibers::promise< int > p; in fn2()
48 boost::fibers::future< int > f( p.get_future() ); in fn2()
50 boost::fibers::fiber( boost::fibers::launch::post, fn1, & p, 7).detach(); in fn2()
90 void fn11( boost::fibers::promise< int > p) { in fn11()
95 void fn12( boost::fibers::promise< int& > p) { in fn12()
101 void fn13( boost::fibers::promise< void > p) { in fn13()
109 boost::fibers::future< int > f1; in test_future_create()
113 boost::fibers::promise< int > p2; in test_future_create()
114 boost::fibers::future< int > f2 = p2.get_future(); in test_future_create()
[all …]
Dtest_future_dispatch.cpp41 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
47 boost::fibers::promise< int > p; in fn2()
48 boost::fibers::future< int > f( p.get_future() ); in fn2()
50 boost::fibers::fiber( boost::fibers::launch::dispatch, fn1, & p, 7).detach(); in fn2()
90 void fn11( boost::fibers::promise< int > p) { in fn11()
95 void fn12( boost::fibers::promise< int& > p) { in fn12()
101 void fn13( boost::fibers::promise< void > p) { in fn13()
109 boost::fibers::future< int > f1; in test_future_create()
113 boost::fibers::promise< int > p2; in test_future_create()
114 boost::fibers::future< int > f2 = p2.get_future(); in test_future_create()
[all …]
Dtest_shared_future_dispatch.cpp41 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
47 boost::fibers::promise< int > p; in fn2()
48 boost::fibers::shared_future< int > f( p.get_future().share() ); in fn2()
50 boost::fibers::fiber( boost::fibers::launch::dispatch, fn1, & p, 7).detach(); in fn2()
90 void fn11( boost::fibers::promise< int > p) { in fn11()
95 void fn12( boost::fibers::promise< int& > p) { in fn12()
101 void fn13( boost::fibers::promise< void > p) { in fn13()
110 boost::fibers::shared_future< int > f1; in test_shared_future_create()
111 boost::fibers::shared_future< int > f2 = f1; in test_shared_future_create()
118 boost::fibers::promise< int > p; in test_shared_future_create()
[all …]
Dtest_shared_future_post.cpp41 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
47 boost::fibers::promise< int > p; in fn2()
48 boost::fibers::shared_future< int > f( p.get_future().share() ); in fn2()
50 boost::fibers::fiber( boost::fibers::launch::post, fn1, & p, 7).detach(); in fn2()
90 void fn11( boost::fibers::promise< int > p) { in fn11()
95 void fn12( boost::fibers::promise< int& > p) { in fn12()
101 void fn13( boost::fibers::promise< void > p) { in fn13()
110 boost::fibers::shared_future< int > f1; in test_shared_future_create()
111 boost::fibers::shared_future< int > f2 = f1; in test_shared_future_create()
118 boost::fibers::promise< int > p; in test_shared_future_create()
[all …]
Dtest_condition_variable_dispatch.cpp40 boost::fibers::mutex mutex;
41 boost::fibers::condition_variable cond;
47 std::unique_lock<boost::fibers::mutex> lock(data->mutex); in condition_test_fiber()
67 void notify_one_fn( boost::fibers::condition_variable & cond) { in notify_one_fn()
71 void notify_all_fn( boost::fibers::condition_variable & cond) { in notify_all_fn()
76 boost::fibers::mutex & mtx, in wait_fn()
77 boost::fibers::condition_variable & cond) { in wait_fn()
78 std::unique_lock< boost::fibers::mutex > lk( mtx); in wait_fn()
85 boost::fibers::mutex mtx; in test_one_waiter_notify_one()
86 boost::fibers::condition_variable cond; in test_one_waiter_notify_one()
[all …]
Dtest_condition_variable_post.cpp40 boost::fibers::mutex mutex;
41 boost::fibers::condition_variable cond;
47 std::unique_lock<boost::fibers::mutex> lock(data->mutex); in condition_test_fiber()
67 void notify_one_fn( boost::fibers::condition_variable & cond) { in notify_one_fn()
71 void notify_all_fn( boost::fibers::condition_variable & cond) { in notify_all_fn()
76 boost::fibers::mutex & mtx, in wait_fn()
77 boost::fibers::condition_variable & cond) { in wait_fn()
78 std::unique_lock< boost::fibers::mutex > lk( mtx); in wait_fn()
85 boost::fibers::mutex mtx; in test_one_waiter_notify_one()
86 boost::fibers::condition_variable cond; in test_one_waiter_notify_one()
[all …]
Dtest_buffered_channel_dispatch.cpp51 boost::fibers::buffered_channel< int > c( 0); in test_zero_wm()
52 } catch ( boost::fibers::fiber_error const&) { in test_zero_wm()
59 boost::fibers::buffered_channel< int > c( 16); in test_push()
60 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_push()
64 boost::fibers::buffered_channel< int > c( 16); in test_push_closed()
66 BOOST_CHECK( boost::fibers::channel_op_status::closed == c.push( 1) ); in test_push_closed()
70 boost::fibers::buffered_channel< int > c( 2); in test_try_push()
71 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_try_push()
75 boost::fibers::buffered_channel< int > c( 2); in test_try_push_closed()
76 BOOST_CHECK( boost::fibers::channel_op_status::success == c.try_push( 1) ); in test_try_push_closed()
[all …]
Dtest_buffered_channel_post.cpp51 boost::fibers::buffered_channel< int > c( 0); in test_zero_wm()
52 } catch ( boost::fibers::fiber_error const&) { in test_zero_wm()
59 boost::fibers::buffered_channel< int > c( 16); in test_push()
60 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_push()
64 boost::fibers::buffered_channel< int > c( 16); in test_push_closed()
66 BOOST_CHECK( boost::fibers::channel_op_status::closed == c.push( 1) ); in test_push_closed()
70 boost::fibers::buffered_channel< int > c( 2); in test_try_push()
71 BOOST_CHECK( boost::fibers::channel_op_status::success == c.push( 1) ); in test_try_push()
75 boost::fibers::buffered_channel< int > c( 2); in test_try_push_closed()
76 BOOST_CHECK( boost::fibers::channel_op_status::success == c.try_push( 1) ); in test_try_push_closed()
[all …]
Dtest_promise_post.cpp36 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
42 boost::fibers::promise< int > p; in fn2()
43 boost::fibers::future< int > f( p.get_future() ); in fn2()
45 boost::fibers::fiber( boost::fibers::launch::post, fn1, & p, 7).detach(); in fn2()
88 boost::fibers::promise< int > p1; in test_promise_create()
91 std::allocator< boost::fibers::promise< int > > alloc; in test_promise_create()
92 boost::fibers::promise< int > p2( std::allocator_arg, alloc); in test_promise_create()
97 boost::fibers::promise< int& > p1; in test_promise_create_ref()
100 std::allocator< boost::fibers::promise< int& > > alloc; in test_promise_create_ref()
101 boost::fibers::promise< int& > p2( std::allocator_arg, alloc); in test_promise_create_ref()
[all …]
Dtest_promise_dispatch.cpp36 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
42 boost::fibers::promise< int > p; in fn2()
43 boost::fibers::future< int > f( p.get_future() ); in fn2()
45 boost::fibers::fiber( boost::fibers::launch::dispatch, fn1, & p, 7).detach(); in fn2()
88 boost::fibers::promise< int > p1; in test_promise_create()
91 std::allocator< boost::fibers::promise< int > > alloc; in test_promise_create()
92 boost::fibers::promise< int > p2( std::allocator_arg, alloc); in test_promise_create()
97 boost::fibers::promise< int& > p1; in test_promise_create_ref()
100 std::allocator< boost::fibers::promise< int& > > alloc; in test_promise_create_ref()
101 boost::fibers::promise< int& > p2( std::allocator_arg, alloc); in test_promise_create_ref()
[all …]
Dtest_fss_dispatch.cpp15 boost::fibers::mutex check_mutex;
16 boost::fibers::mutex fss_mutex;
22 std::unique_lock<boost::fibers::mutex> lock(fss_mutex); in fss_value_t()
28 std::unique_lock<boost::fibers::mutex> lock(fss_mutex); in ~fss_value_t()
34 boost::fibers::fiber_specific_ptr<fss_value_t> fss_value;
41 std::unique_lock<boost::fibers::mutex> lock(check_mutex); in fss_fiber()
52 boost::fibers::fiber f1( boost::fibers::launch::dispatch, fss_fiber); in fss()
53 boost::fibers::fiber f2( boost::fibers::launch::dispatch, fss_fiber); in fss()
54 boost::fibers::fiber f3( boost::fibers::launch::dispatch, fss_fiber); in fss()
55 boost::fibers::fiber f4( boost::fibers::launch::dispatch, fss_fiber); in fss()
[all …]
Dtest_fss_post.cpp15 boost::fibers::mutex check_mutex;
16 boost::fibers::mutex fss_mutex;
22 std::unique_lock<boost::fibers::mutex> lock(fss_mutex); in fss_value_t()
28 std::unique_lock<boost::fibers::mutex> lock(fss_mutex); in ~fss_value_t()
34 boost::fibers::fiber_specific_ptr<fss_value_t> fss_value;
41 std::unique_lock<boost::fibers::mutex> lock(check_mutex); in fss_fiber()
52 boost::fibers::fiber f1( boost::fibers::launch::post, fss_fiber); in fss()
53 boost::fibers::fiber f2( boost::fibers::launch::post, fss_fiber); in fss()
54 boost::fibers::fiber f3( boost::fibers::launch::post, fss_fiber); in fss()
55 boost::fibers::fiber f4( boost::fibers::launch::post, fss_fiber); in fss()
[all …]
Dtest_condition_variable_any_post.cpp39 boost::fibers::mutex mutex;
40 boost::fibers::condition_variable_any cond;
68 void notify_one_fn( boost::fibers::condition_variable_any & cond) { in notify_one_fn()
72 void notify_all_fn( boost::fibers::condition_variable_any & cond) { in notify_all_fn()
77 boost::fibers::mutex & mtx, in wait_fn()
78 boost::fibers::condition_variable_any & cond) { in wait_fn()
87 boost::fibers::mutex mtx; in test_one_waiter_notify_one()
88 boost::fibers::condition_variable_any cond; in test_one_waiter_notify_one()
90 boost::fibers::fiber f1( in test_one_waiter_notify_one()
91 boost::fibers::launch::post, in test_one_waiter_notify_one()
[all …]
Dtest_condition_variable_any_dispatch.cpp39 boost::fibers::mutex mutex;
40 boost::fibers::condition_variable_any cond;
68 void notify_one_fn( boost::fibers::condition_variable_any & cond) { in notify_one_fn()
72 void notify_all_fn( boost::fibers::condition_variable_any & cond) { in notify_all_fn()
77 boost::fibers::mutex & mtx, in wait_fn()
78 boost::fibers::condition_variable_any & cond) { in wait_fn()
87 boost::fibers::mutex mtx; in test_one_waiter_notify_one()
88 boost::fibers::condition_variable_any cond; in test_one_waiter_notify_one()
90 boost::fibers::fiber f1( in test_one_waiter_notify_one()
91 boost::fibers::launch::dispatch, in test_one_waiter_notify_one()
[all …]
Dtest_mutex_post.cpp44 void fn3( boost::fibers::timed_mutex & m) { in fn3()
53 void fn4( boost::fibers::timed_mutex & m) { in fn4()
62 void fn5( boost::fibers::timed_mutex & m) { in fn5()
71 void fn6( boost::fibers::timed_mutex & m) { in fn6()
79 void fn7( boost::fibers::timed_mutex & m) { in fn7()
88 void fn8( boost::fibers::timed_mutex & m) { in fn8()
97 void fn9( boost::fibers::recursive_timed_mutex & m) { in fn9()
108 void fn10( boost::fibers::recursive_timed_mutex & m) { in fn10()
119 void fn11( boost::fibers::recursive_timed_mutex & m) { in fn11()
130 void fn12( boost::fibers::recursive_timed_mutex & m) { in fn12()
[all …]
Dtest_mutex_dispatch.cpp44 void fn3( boost::fibers::timed_mutex & m) { in fn3()
53 void fn4( boost::fibers::timed_mutex & m) { in fn4()
62 void fn5( boost::fibers::timed_mutex & m) { in fn5()
71 void fn6( boost::fibers::timed_mutex & m) { in fn6()
79 void fn7( boost::fibers::timed_mutex & m) { in fn7()
88 void fn8( boost::fibers::timed_mutex & m) { in fn8()
97 void fn9( boost::fibers::recursive_timed_mutex & m) { in fn9()
108 void fn10( boost::fibers::recursive_timed_mutex & m) { in fn10()
119 void fn11( boost::fibers::recursive_timed_mutex & m) { in fn11()
130 void fn12( boost::fibers::recursive_timed_mutex & m) { in fn12()
[all …]
Dtest_packaged_task_dispatch.cpp68 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
74 boost::fibers::promise< int > p; in fn2()
75 boost::fibers::future< int > f( p.get_future() ); in fn2()
77 boost::fibers::fiber( boost::fibers::launch::dispatch, fn1, & p, 7).detach(); in fn2()
125 boost::fibers::packaged_task< int() > t1; in test_packaged_task_create()
129 boost::fibers::packaged_task< int() > t2( fn3); in test_packaged_task_create()
136 boost::fibers::packaged_task< A() > t1; in test_packaged_task_create_move()
140 boost::fibers::packaged_task< A() > t2( fn9); in test_packaged_task_create_move()
146 boost::fibers::packaged_task< void() > t1; in test_packaged_task_create_void()
150 boost::fibers::packaged_task< void() > t2( fn4); in test_packaged_task_create_void()
[all …]
Dtest_packaged_task_post.cpp68 void fn1( boost::fibers::promise< int > * p, int i) { in fn1()
74 boost::fibers::promise< int > p; in fn2()
75 boost::fibers::future< int > f( p.get_future() ); in fn2()
77 boost::fibers::fiber( boost::fibers::launch::post, fn1, & p, 7).detach(); in fn2()
125 boost::fibers::packaged_task< int() > t1; in test_packaged_task_create()
129 boost::fibers::packaged_task< int() > t2( fn3); in test_packaged_task_create()
136 boost::fibers::packaged_task< A() > t1; in test_packaged_task_create_move()
140 boost::fibers::packaged_task< A() > t2( fn9); in test_packaged_task_create_move()
146 boost::fibers::packaged_task< void() > t1; in test_packaged_task_create_void()
150 boost::fibers::packaged_task< void() > t2( fn4); in test_packaged_task_create_void()
[all …]
Dtest_async_dispatch.cpp62 boost::fibers::future< void > f1 = boost::fibers::async( boost::fibers::launch::dispatch, fn1); in test_async_1()
70 … boost::fibers::future< int > f1 = boost::fibers::async( boost::fibers::launch::dispatch, fn2, i); in test_async_2()
78 …boost::fibers::future< int& > f1 = boost::fibers::async( boost::fibers::launch::dispatch, fn3, std… in test_async_3()
87 …boost::fibers::future< A > f1 = boost::fibers::async( boost::fibers::launch::dispatch, fn4, std::m… in test_async_4()
97 boost::fibers::future< void > f1 = boost::fibers::async( in test_async_5()
98 boost::fibers::launch::dispatch, in test_async_5()
109 boost::fibers::future< void > f1 = boost::fibers::async( in test_async_6()
110 boost::fibers::launch::dispatch, in test_async_6()
119 boost::fibers::future< void > f1 = boost::fibers::async( in test_async_stack_alloc()
120 boost::fibers::launch::dispatch, in test_async_stack_alloc()
[all …]
Dtest_condition_mt_dispatch.cpp34 boost::fibers::mutex & mtx, in wait_fn()
35 boost::fibers::condition_variable & cond, in wait_fn()
38 std::unique_lock< boost::fibers::mutex > lk( mtx); in wait_fn()
44 boost::fibers::mutex & mtx, in notify_one_fn()
45 boost::fibers::condition_variable & cond, in notify_one_fn()
48 std::unique_lock< boost::fibers::mutex > lk( mtx); in notify_one_fn()
55 boost::fibers::mutex & mtx, in notify_all_fn()
56 boost::fibers::condition_variable & cond, in notify_all_fn()
59 std::unique_lock< boost::fibers::mutex > lk( mtx); in notify_all_fn()
66 boost::fibers::mutex & mtx, in fn1()
[all …]
Dtest_condition_mt_post.cpp34 boost::fibers::mutex & mtx, in wait_fn()
35 boost::fibers::condition_variable & cond, in wait_fn()
38 std::unique_lock< boost::fibers::mutex > lk( mtx); in wait_fn()
44 boost::fibers::mutex & mtx, in notify_one_fn()
45 boost::fibers::condition_variable & cond, in notify_one_fn()
48 std::unique_lock< boost::fibers::mutex > lk( mtx); in notify_one_fn()
55 boost::fibers::mutex & mtx, in notify_all_fn()
56 boost::fibers::condition_variable & cond, in notify_all_fn()
59 std::unique_lock< boost::fibers::mutex > lk( mtx); in notify_all_fn()
66 boost::fibers::mutex & mtx, in fn1()
[all …]
Dtest_fiber_dispatch.cpp149 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn4); in fn5()
156 boost::fibers::context * ctx( in test_scheduler_dtor()
157 boost::fibers::context::active() ); in test_scheduler_dtor()
164 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn1); in test_join_fn()
171 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn2, 3, "abc"); in test_join_fn()
181 boost::fibers::fiber( boost::fibers::launch::dispatch, & X::foo, & x, 3).join(); in test_join_memfn()
190 boost::fibers::fiber f( boost::fibers::launch::dispatch, cp); in test_join_copyable()
201 boost::fibers::fiber f( boost::fibers::launch::dispatch, std::move( mv) ); in test_join_moveable()
213 boost::fibers::fiber f( in test_join_lambda()
214 boost::fibers::launch::dispatch, [i,abc]() { in test_join_lambda()
[all …]
Dtest_fiber_post.cpp149 boost::fibers::fiber f( boost::fibers::launch::post, fn4); in fn5()
156 boost::fibers::context * ctx( in test_scheduler_dtor()
157 boost::fibers::context::active() ); in test_scheduler_dtor()
164 boost::fibers::fiber f( boost::fibers::launch::post, fn1); in test_join_fn()
171 boost::fibers::fiber f( boost::fibers::launch::post, fn2, 3, "abc"); in test_join_fn()
181 boost::fibers::fiber( boost::fibers::launch::post, & X::foo, & x, 3).join(); in test_join_memfn()
190 boost::fibers::fiber f( boost::fibers::launch::post, cp); in test_join_copyable()
201 boost::fibers::fiber f( boost::fibers::launch::post, std::move( mv) ); in test_join_moveable()
213 boost::fibers::fiber f( in test_join_lambda()
214 boost::fibers::launch::post, [i,abc]() { in test_join_lambda()
[all …]

123456789