2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 13:42:21 +00:00
Commit Graph

171 Commits

Author SHA1 Message Date
Oliver Kowalke
b03ab3b3ba disable mt-tests 2015-09-29 17:48:34 +02:00
Oliver Kowalke
a48d3a44fa fix test 2015-09-28 18:47:51 +02:00
Oliver Kowalke
43da6f5c1c modify test for multithreaded access to future 2015-09-27 16:16:09 +02:00
Oliver Kowalke
6e479279dd use flag for multihtreded use of condition test 2015-09-24 17:36:41 +02:00
Oliver Kowalke
1f88055f42 enhance test 2015-09-23 17:45:13 +02:00
Oliver Kowalke
b43f288469 support for futures added 2015-09-22 19:17:08 +02:00
Oliver Kowalke
1b274d9b73 support for fiber-specific storage 2015-09-22 19:10:09 +02:00
Oliver Kowalke
b4f47821d9 add notice of derived work to tests 2015-09-22 19:06:37 +02:00
Oliver Kowalke
38aa1f4366 support of detaching fibers added 2015-09-22 19:05:57 +02:00
Oliver Kowalke
6ad6579666 fix interruption + condition:wait() 2015-09-21 20:47:53 +02:00
Oliver Kowalke
c0f3fe393c enhance test_fiber 2015-09-21 20:37:55 +02:00
Oliver Kowalke
128b534058 fix context 2015-09-21 20:34:41 +02:00
Oliver Kowalke
1ad58fbba1 add interruption 2015-09-21 20:18:53 +02:00
Oliver Kowalke
7b1e7839b4 class bounded_channel added 2015-09-20 18:10:55 +02:00
Oliver Kowalke
b8de63af06 class unbounded_channel added 2015-09-20 18:05:05 +02:00
Oliver Kowalke
bba963c64c class barrier added 2015-09-20 15:38:32 +02:00
Oliver Kowalke
a856a96369 class condtion added 2015-09-20 11:33:59 +02:00
Oliver Kowalke
c8a1c4e4df class recursive_timed_mutex added 2015-09-19 18:14:17 +02:00
Oliver Kowalke
6b01f060b7 class timed_mutex added 2015-09-19 18:03:41 +02:00
Oliver Kowalke
e6ddbe10a1 class recursive_mutex added 2015-09-19 17:27:45 +02:00
Oliver Kowalke
3f5e076f3a class mutex added 2015-09-19 17:01:20 +02:00
Oliver Kowalke
6da902ff09 support sleep_for()/sleep_until() 2015-09-19 08:59:53 +02:00
Oliver Kowalke
8d41c994af add unit-test for joining a fiber running in another fiber 2015-09-18 18:33:35 +02:00
Oliver Kowalke
8a9c9916c7 support this_fiber::yield() 2015-09-18 17:48:57 +02:00
Oliver Kowalke
7d448f4943 enhance unit-test: fiber-fn with additional arguments 2015-09-18 17:37:02 +02:00
Oliver Kowalke
a8d426cc5f add more fiber tests 2015-09-16 22:21:51 +02:00
Oliver Kowalke
a8e90aedb8 add joining a fiber 2015-09-16 20:51:26 +02:00
Oliver Kowalke
eafeaaae01 remove examples and tests 2015-09-16 19:12:57 +02:00
Oliver Kowalke
8c4dda107c support signaling a fiber from another thread
- for this first version lockfree::queue<> is used
- maybe Dimitry Byukov's mpsc intrusive queue is better suited
2015-09-13 09:20:35 +02:00
Oliver Kowalke
51d08226a4 if not fibers in queues - suspend till signaled or timeout
- if no fibers are ready to run suspend the thread and wait till
  * signaled by scheduler::signal() for new fiber (ready to run)
  * time_point of a sleeping fiber has reached
2015-09-11 20:45:54 +02:00
Oliver Kowalke
c416b6fe1e disable test with multi-threading
- scheduler::remote_signal() not implemented yet
2015-09-11 20:11:56 +02:00
Oliver Kowalke
abd1ff524c fixes for signaling interruption and wait 2015-09-11 18:42:16 +02:00
Oliver Kowalke
4887028567 fix unit-test for bounded_channel 2015-09-09 19:48:55 +02:00
Oliver Kowalke
66e7b59424 fix usage of std::chrono 2015-09-05 11:57:36 +02:00
Oliver Kowalke
0a296315f7 use steady_clock isntead of high_resolution_clock 2015-09-05 10:57:50 +02:00
Oliver Kowalke
2601e72673 let sched_algo_ be managed by unique_ptr 2015-08-26 18:59:18 +02:00
Oliver Kowalke
887c96f835 interrupt + join deteched fibers in dtor fiber-manger 2015-08-26 17:29:54 +02:00
Nat Goodspeed
b51d78877c Test that bounded_channel(n, n) throws an exception.
Given the documented behavior of bounded_channel(hwm, lwm), it follows that
bounded_channel(n, n) is invalid.

If the number of items in the channel == hwm, a push will block.

But if the number of items in the channel <= lwm, a push will succeed without
blocking.

Therefore, setting hwm == lwm results in a contradiction.
2015-08-15 11:12:34 -04:00
Nat Goodspeed
3e95946350 Add tests for bounded_channel::lower_bound().
We intend to document that bounded_channel(hwm) is equivalent to
bounded_channel(hwm, (hwm-1)). That may or may not simplify the code, but it
certainly simplifies the reader's mental model of the relationship between the
two constructors.

However, that assertion requires that for bounded_channel(hwm), lower_bound()
in fact return (hwm-1). Test for that.

Also use BOOST_CHECK_EQUAL(a, b) instead of BOOST_CHECK(a == b) where
applicable, since the former is more informative when the test fails.

Sadly, tests on channel_op_status must still use BOOST_CHECK(a == b) --
apparently because channel_op_status, as an enum class, cannot be streamed to
std::ostream?
2015-08-15 10:48:58 -04:00
Oliver Kowalke
7c25c83465 (un)bounded_channel: remove is_empty()/is_closed()/is_full() 2015-08-05 19:59:47 +02:00
Nat Goodspeed
b6f4fc8d42 test_try_push() should call try_push(). 2015-08-05 07:51:49 -04:00
Oliver Kowalke
3b6f736a39 fixes for (un)bounded_channel 2015-08-04 19:30:31 +02:00
Oliver Kowalke
dbfde81013 enhance unit-test for bounded_channel 2015-08-04 17:19:26 +02:00
Oliver Kowalke
ba80101f47 enhance test for bounded_channel
- note implementation of waiting_queue does not preserve order
  therefore unit test for bounded_channel fails
2015-08-03 17:33:04 +02:00
Oliver Kowalke
f456902492 add test for bounded_channel (basics) 2015-08-02 21:17:04 +02:00
Oliver Kowalke
3538208387 test_unbounded_channel: add test for moveable type 2015-08-02 21:16:40 +02:00
Oliver Kowalke
f275125b93 fixes for unbounded_channel 2015-08-02 20:48:52 +02:00
Oliver Kowalke
6a0b14e3e8 some mods for asnyc(some mods for asnyc()) 2015-07-31 14:49:48 +02:00
Oliver Kowalke
81babd03be tests: enable tests for shared_future<> 2015-07-31 12:12:36 +02:00
Oliver Kowalke
a9eb294f9d mt mutext test: replace rref by generic lambda 2015-07-31 08:59:40 +02:00