2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 01:32:32 +00:00

support of detaching fibers added

This commit is contained in:
Oliver Kowalke
2015-09-22 19:04:48 +02:00
parent 6ad6579666
commit 38aa1f4366
4 changed files with 81 additions and 5 deletions

View File

@@ -80,12 +80,22 @@ void wait_fn(
}
void test_condition_wait_is_a_interruption_point() {
condition_test_data data;
boost::fibers::fiber f( & condition_test_fiber, &data);
{
condition_test_data data;
boost::fibers::fiber f( & condition_test_fiber, &data);
f.interrupt();
f.join();
BOOST_CHECK_EQUAL(data.awoken,0);
f.interrupt();
f.join();
BOOST_CHECK_EQUAL(data.awoken,0);
}
{
condition_test_data data;
boost::fibers::fiber f( & condition_test_fiber, &data);
boost::this_fiber::yield();
f.interrupt();
f.join();
BOOST_CHECK_EQUAL(data.awoken,0);
}
}
void test_one_waiter_notify_one() {