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

379 Commits

Author SHA1 Message Date
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
Oliver Kowalke
09f5bfa848 formating correction 2015-07-29 11:30:38 +02:00
Oliver Kowalke
642fff9b93 remove unused preserve_fpu() functionality 2015-07-29 11:14:27 +02:00
Oliver Kowalke
cb19fe4c41 Update fiber_context.hpp 2015-07-20 19:47:43 +02:00
Nat Goodspeed
3674114094 Merge branch 'develop' of github.com:olk/boost-fiber into develop 2015-07-19 23:11:02 -04:00
Oliver Kowalke
2003e43d87 fix calling fn in future 2015-07-13 19:56:05 +02:00
Oliver Kowalke
e7b1ee131c add function ready_fibers() 2015-07-03 18:03:14 +02:00
Oliver Kowalke
7c48c18d3d add return value specification to lambda 2015-06-29 17:13:17 +02:00
Oliver Kowalke
afe7714c61 small formating + fixing for channels 2015-06-28 10:25:05 +02:00
Nat Goodspeed
e290073b98 Make fiber_context::resume() compatible with Boost 1.58.0.
In Boost 1.58, execution_context has a resume() member, not an operator()().
Call ctx_.resume() instead of ctx_().
2015-06-26 14:40:16 -04:00
Nat Goodspeed
48f427a4a4 Merge branch 'develop' of github.com:olk/boost-fiber into develop 2015-06-26 10:58:00 -04:00
Oliver Kowalke
8a7d376450 add invoke() in orderr to support calling member fn 2015-06-23 17:56:33 +02:00
Nat Goodspeed
15a17ca35d Introduce sched_algorithm_with_properties<>::awakened() overload.
sched_algorithm_with_properties<> must intercept awakened() calls before
forwarding control to the subclass override. That pretty much requires two
different virtual methods: one for sched_algorithm subclasses WITHOUT
properties, the other for sched_algorithm_with_properties subclasses.
Originally we used a different name (awakened_props()), but that was
bothersome. It makes more sense to use a different awakened() overload
instead, one that passes in the relevant properties object.

Fix examples/priority.cpp accordingly.

Also delegate instantiation of a new properties object to new_properties()
virtual method. Overriding this method allows you to customize allocation,
instead of sched_algorithm_with_properties<> unconditionally putting the new
properties object on the heap. Validate the new_properties() return value.
2015-06-21 22:39:00 -04:00
Oliver Kowalke
dd374f3be4 Revert "fix missng argument package in async()"
This reverts commit 47bd514720.
2015-06-21 19:01:43 +02:00
Oliver Kowalke
47bd514720 fix missng argument package in async() 2015-06-21 11:51:37 +02:00
Oliver Kowalke
5d18cd5a4e add interruption point after fiber_manager::run()
- functions fiber_manager::join()/fiber_manager::yield()/fiber_manager:.wait()/fiber_manager_wait_until()
  check for interrption of the current fiber
2015-06-21 10:53:37 +02:00
Oliver Kowalke
6c35324727 use atomics per default
- atomics can be disable using BOOST_FIBERS_NO_ATOMICS compiler flag
2015-06-20 21:31:34 +02:00
Nat Goodspeed
97e132abd6 Add BOOST_ASSERT_MSG in case properties() called when null.
This could either be because the thread's current sched_algorithm is not a
subclass of sched_algorithm_with_properties (e.g. set_scheduling_algorithm()
was never called for this thread, so round_robin is in use), or because the
fiber has not yet reached execution. A fiber's properties are instantiated
when it is first scheduled.
2015-06-20 12:00:11 -04:00
Oliver Kowalke
20d08d98cd enable atomics with BOOST_FIBERS_USE_ATOMCIS 2015-06-19 21:39:34 +02:00
Oliver Kowalke
2002dba9d3 enable/disable atomic<> with BOOST_FIBERS_THREADSAFE 2015-06-19 18:57:23 +02:00
Oliver Kowalke
61dc492f31 some stuff/corrections 2015-06-19 18:55:02 +02:00
Oliver Kowalke
52a9da9180 remove invalid noexcept specifier from fiber::detach() 2015-06-13 08:40:13 +02:00
Oliver Kowalke
e2404eefd7 introduce new queue for terminated fibers 2015-06-13 08:14:14 +02:00
Oliver Kowalke
baf9a55868 enable algiment of control structures on stack 2015-06-10 20:52:14 +02:00
Oliver Kowalke
e22c7fb1cb some formating 2015-05-22 09:50:39 +02:00
Oliver Kowalke
2b7d48da12 rename queue_op_status -> channel_op_status 2015-05-22 09:32:36 +02:00
Oliver Kowalke
3c7084e359 fix call of execution_context::operator() * exampe priority 2015-05-14 12:11:37 +02:00
Nat Goodspeed
068aa87e8e fiber_properties must be polymorphic. Add virtual destructor.
This was an inadvertent oversight. The existing destructor even had a comment
explaining why it must be virtual!
2015-05-13 08:40:45 -04:00
Nat Goodspeed
00098f171a For compatibility with Boost 1.58, call execution_context::resume(). 2015-05-13 08:39:25 -04:00
Nat Goodspeed
f5d136d974 Restore (merge-clobbered?) detach, join, interrupt method decls. 2015-05-13 08:38:28 -04:00
Nat Goodspeed
89b3dafd5c Eliminate spurious whitespace differences from upstream develop. 2015-05-11 09:48:23 -04:00
Nat Goodspeed
77a443b03b Merge branch 'develop' of github.com:olk/boost-fiber into sched-props-dev 2015-05-11 05:51:14 -04:00
Nat Goodspeed
a4e77e502f Re-add bool fiber_manager::preserve_fpu() to header file. 2015-05-11 05:46:26 -04:00
Nat Goodspeed
765014daee working our way through build errors 2015-05-11 05:38:45 -04:00