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

412 Commits

Author SHA1 Message Date
Oliver Kowalke
f14be69223 remove scheduler::wait:interval_ + fixups of comments 2015-09-11 21:03:09 +02:00
Oliver Kowalke
693c53d034 fix sleep_queue: cmp-op + use set<>::insert() 2015-09-11 20:45:54 +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
abd1ff524c fixes for signaling interruption and wait 2015-09-11 18:42:16 +02:00
Oliver Kowalke
ebd147c08d fix join(), this_fiber::sleep_until() 2015-09-10 20:42:28 +02:00
Oliver Kowalke
4764c1184c signal() added 2015-09-10 19:52:08 +02:00
Oliver Kowalke
d3843efbe0 fix using intruisve::list<> 2015-09-10 18:08:10 +02:00
Oliver Kowalke
c1d3d478d8 use wait_queue with safe_link featurre, use erase_and_dispose() for
unlinking
2015-09-10 05:49:10 +02:00
Oliver Kowalke
c89410dfd8 uses intrusive::list<> isntread hand-written queues 2015-09-09 19:22:54 +02:00
Oliver Kowalke
291b9d7c17 small fixes 2015-09-08 21:33:20 +02:00
Oliver Kowalke
6459b76075 do not use context::active() inside scheduler 2015-09-07 22:30:26 +02:00
Oliver Kowalke
2689e34be6 store pointer to main-context in scheduler 2015-09-07 22:29:57 +02:00
Oliver Kowalke
0099b384c1 rename of flag and check function is_man_context() 2015-09-07 17:44:29 +02:00
Oliver Kowalke
d66575e2e6 fiber_manager renamed to scheduler 2015-09-07 17:35:37 +02:00
Oliver Kowalke
6499bb07e7 fiber_context renamed to context 2015-09-07 17:23:59 +02:00
Oliver Kowalke
7f97616aa2 Merge branch 'ws' into develop 2015-09-07 17:07:59 +02:00
Oliver Kowalke
7233f617d7 remove class scheduler - fiber_context has static TLS
- detail:.scheduler was removed
- fiber_context has a static thread-local pointer to the active
  fiber_context
- fiber_context has member to pointer of fiber_manager
- functions of fiber_manager are accessed only via fiber_context
- if fiber f is resumed, the fiber_manager of the current active fiber
  f' is assigned to f
  -> that is necessary if f was stolen form another thread
2015-09-07 11:50:01 +02:00
Oliver Kowalke
bc044fbed2 stuff 2015-09-06 21:36:06 +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
4187c68f4e release mutex before signal condition-variable 2015-09-05 10:37:27 +02:00
Oliver Kowalke
983f2efb43 replace decltype(auto) -> void in lambda expression 2015-09-05 08:00:26 +02:00
Oliver Kowalke
af6eeb3380 fix header issue 2015-09-05 04:48:59 +02:00
Oliver Kowalke
0e8af4a29f fix future<>::wait_until() - use time_point< Clock, Duration > 2015-09-05 04:03:55 +02:00
Nat Goodspeed
bd2eb2fe72 Reconcile condition_variable::wait_for(pred) with wait_until(pred). 2015-09-03 07:13:01 -04:00
Nat Goodspeed
37a0490bbd Fix bug in this_fiber::properties<>().
When the running thread's main fiber calls this_fiber::properties<>() without
yet having passed through sched_algorithm_with_properties::awakened(), which
is what actually instantiates the fiber_properties subclass, you could end up
without a properties instance. Fortunately there's an easy workaround: call
yield().

Remove that workaround from examples/priority.cpp.
2015-09-01 20:21:13 -04:00
Oliver Kowalke
0192cb2833 fix formating in future.hpp 2015-08-28 16:59:16 +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
Oliver Kowalke
9a667e751e fix formating code 2015-08-26 17:27:51 +02:00
Oliver Kowalke
8f963d03f0 remove BOOST_FIBERS_SEGMENTS - boost.context used instead 2015-08-23 10:48:21 +02:00
Oliver Kowalke
2855e5128a fix asio stuff 2015-08-18 17:46:14 +02:00
Oliver Kowalke
3067fd28f1 fix bounded_channel's lwm and hwm issue 2015-08-18 17:45:54 +02:00
Nat Goodspeed
28cbce1256 Eliminate opaque fiber_properties::back_ptr typedef.
It's more straightforward to use the underlying type: fiber_context*.
2015-08-14 16:10:42 -04:00
Oliver Kowalke
a6f2770cab Revert "fix usage of result_of"
This reverts commit 59b99f3e69.
2015-08-12 18:14:43 +02:00
Oliver Kowalke
59b99f3e69 fix usage of result_of 2015-08-12 17:47:43 +02:00
Oliver Kowalke
963af66c02 fix using packagged_task<> in asnyc() 2015-08-06 19:04:43 +02:00
Oliver Kowalke
3d93a5f98f fix missing line 2015-08-06 17:30:34 +02:00
Oliver Kowalke
99313c93da remove TODO comments 2015-08-06 17:22:14 +02:00
Oliver Kowalke
7c25c83465 (un)bounded_channel: remove is_empty()/is_closed()/is_full() 2015-08-05 19:59:47 +02:00
Oliver Kowalke
3b6f736a39 fixes for (un)bounded_channel 2015-08-04 19:30:31 +02:00
Oliver Kowalke
b91fc419cf fix waiting_queue impl 2015-08-03 20:19:51 +02:00
Oliver Kowalke
f456902492 add test for bounded_channel (basics) 2015-08-02 21:17:04 +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
01a2162eb0 async(): use rv-ref in result_of<> 2015-07-31 10:48:00 +02:00
Oliver Kowalke
09729c6eba add comment related to derrred-call 2015-07-31 08:59:19 +02:00
Oliver Kowalke
7eac5d4e98 fix invoke() 2015-07-30 21:09:08 +02:00
Oliver Kowalke
f55512ce12 pass tuple/index_sequence to public ctor of fiber_context 2015-07-30 18:33:01 +02:00
Oliver Kowalke
6eaab69a76 bounded-channel: high-watermark must be greater than zero 2015-07-29 20:06:06 +02:00