2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-01-26 18:42:10 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
Oliver Kowalke
fefffd37eb update documentation 2015-09-01 17:17:38 +02:00
Oliver Kowalke
2601e72673 let sched_algo_ be managed by unique_ptr 2015-08-26 18:59:18 +02:00
Oliver Kowalke
1546533700 examples: priority_scheduler must live long enought
- ~fiber_manager() calls sched_algorithm::pick_next()
- therefore priority_scheudler must live long enough in order to
  be called by ~fiber_manager()
2015-08-26 17:50:12 +02:00
Nat Goodspeed
fd9f16776a Flesh out Customization section with step-by-step directions.
Mark up examples/priority.cpp with code snippets for use in Customization.

Also clarify the effect of changing wait_interval().
2015-08-16 16:38:21 -04: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
Nat Goodspeed
0d5ad2adbd Add ready_fibers() override for examples/priority.cpp. 2015-07-31 17:29:33 -04: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
3c7084e359 fix call of execution_context::operator() * exampe priority 2015-05-14 12:11:37 +02:00
Nat Goodspeed
25ccb85d19 Initialize int priority_ properly to 0, not nullptr. 2015-05-13 08:37:32 -04:00
Nat Goodspeed
9c4cdf3438 Desk-checking pass through fiber_properties source code. 2015-05-10 23:35:15 -04:00
Nat Goodspeed
1bec058e77 Move priority.cpp example program to main examples directory.
Since the library no longer supports C++03, the examples/cpp03 subdirectory
has gone away, along with the cpp11 subdirectory.
2015-05-10 22:59:38 -04:00