Oliver Kowalke
37b22812f8
documentation: note about thread-safe synchronization
...
- note added to section 'Synchronization"
2015-07-29 11:35:01 +02:00
Oliver Kowalke
5c9cbd0307
documentation: add missing function descriptions
2015-07-29 11:30:43 +02:00
Oliver Kowalke
09f5bfa848
formating correction
2015-07-29 11:30:38 +02:00
Oliver Kowalke
88d44ffee6
documentation: fix fals function-links in interruption points
2015-07-29 11:19:18 +02:00
Oliver Kowalke
2cbe22d8af
documentation: add free function wait_interval()
...
- wait_itneval() sets/returns the time interval the thread is set to
sleep if not fiber is ready to run
2015-07-29 11:18:09 +02:00
Oliver Kowalke
642fff9b93
remove unused preserve_fpu() functionality
2015-07-29 11:14:27 +02:00
Oliver Kowalke
3dbca594df
documentation: add missing interruption points in list
2015-07-29 10:59:07 +02:00
Oliver Kowalke
2d07f7b47b
documentation: future throw fiber_interrupted
2015-07-29 10:58:26 +02:00
Oliver Kowalke
d5858a2677
documentation: remove invalid functions
2015-07-29 10:38:42 +02:00
Oliver Kowalke
1c139895e0
documentation: rename queue.qbk -> channel.qbk
2015-07-29 10:25:18 +02:00
Oliver Kowalke
519a8924a9
documentation: barrier:wait() is interruption point
2015-07-29 10:20:01 +02:00
Oliver Kowalke
caf55428a1
documentation: fiber::join() asserts on not-a-fiber
2015-07-29 10:12:31 +02:00
Oliver Kowalke
034c19805c
Merge pull request #38 from nat-goodspeed/develop
...
Responses to recent email
2015-07-29 09:28:45 +02:00
Nat Goodspeed
e1c9b2b54c
Make Rationale section reference new BOOST_FIBERS_NO_ATOMICS passage.
...
Tweaks to new wording.
2015-07-28 22:31:35 -04:00
Nat Goodspeed
dbca64d7d0
Merge branch 'develop' of github.com:olk/boost-fiber into develop
2015-07-28 22:07:13 -04:00
Nat Goodspeed
ac248e75f8
Couple tweaks to futures.qbk.
2015-07-28 22:06:44 -04:00
Oliver Kowalke
b63f95758d
documentation: formating of code in scheduler.qbk
2015-07-28 18:24:25 +02:00
Oliver Kowalke
161f2a134c
documentation: default scheduler is not heap-allocated
...
- round_robin, the default scheduler, is created at thread-creation
as thread-local, local static
2015-07-28 18:20:31 +02:00
Oliver Kowalke
1413406fab
documentation: ready_fibers() returns zero if scheduler has no fibers
2015-07-28 17:22:12 +02:00
Oliver Kowalke
6740de6761
documentation: synch. objects are threadsafe per default
...
- lib uses atomics to safely synchronize objects running in
different threads
- use BOOST_FIBERS_NO_ATOMICS to remove safety
2015-07-28 09:57:00 +02:00
Oliver Kowalke
3fac431abc
documentation: this_fiber::yield() is a interruption point
...
- this_fiber::yield() calls fiber_manager::yield() that calls
fiber_manager::run() -> interruption point
2015-07-28 09:51:58 +02:00
Oliver Kowalke
350a26b27a
documentation: cycles of fiber switch
...
- a context switch between fibers costs less than 100 cycles
2015-07-28 09:20:27 +02:00
Oliver Kowalke
7535e13f92
Merge pull request #37 from nat-goodspeed/develop
...
Describe bounded_channel::pop() et al. same as unbounded_channel.
2015-07-22 18:33:04 +02:00
Nat Goodspeed
2b7f67c1de
Merge branch 'develop' of github.com:olk/boost-fiber into develop
2015-07-22 08:25:49 -04:00
Nat Goodspeed
018972f69a
Describe bounded_channel::pop() et al. same as unbounded_channel.
...
Well, almost the same: bounded_channel pop operations include the note about
unblocking blocked push operations. Parameterize xchannel_pop (et al.) to
allow this divergence between unbounded_channel and bounded_channel pop
methods.
2015-07-22 08:24:17 -04:00
Oliver Kowalke
16fd138565
Merge pull request #36 from nat-goodspeed/develop
...
Fix "enchanneled"/"dechanneled". Encapsulate some redundant wording.
2015-07-21 21:37:49 +02:00
Nat Goodspeed
0004ac676f
Fix "enchanneled"/"dechanneled". Encapsulate some redundant wording.
...
The descriptions of [un]bounded_channel::push() and the other push variants
are very similar, and must be kept consistent. Similarly, all the pop variants
must be kept consistent. Use QuickBook templates to supply much of the wording
for these methods.
2015-07-21 10:44:49 -04:00
Oliver Kowalke
cb19fe4c41
Update fiber_context.hpp
2015-07-20 19:47:43 +02:00
Oliver Kowalke
d61b395207
Update round_robin.cpp
2015-07-20 19:42:11 +02:00
Oliver Kowalke
b6364bf0d4
Merge pull request #35 from nat-goodspeed/develop
...
Incomplete documentation pass
2015-07-20 19:40:03 +02:00
Nat Goodspeed
a4de0bb7a5
More documentation.
...
Add note explaining why synchronization objects can neither be moved nor
copied.
Introduce line breaks for some code lines that get broken strangely by doc
toolchain.
Eliminate reference to mutex::scoped_lock.
2015-07-20 09:40:01 -04:00
Nat Goodspeed
3674114094
Merge branch 'develop' of github.com:olk/boost-fiber into develop
2015-07-19 23:11:02 -04:00
Nat Goodspeed
1dadc51ec4
Add reference documentation for custom scheduling classes.
...
Also resolve certain previously-dangling internal documentation
cross-references: custom, synchronization, scheduling, stack.
Add documentation placeholders for mutex (and friends) lock(), try_lock(),
unlock() methods.
Add documentation placeholders for future (and shared_future)
get_exception_ptr() methods.
Remove documentation for obsolete future (and shared_future) swap(), operator
safe_bool() and operator!() methods.
2015-07-19 22:57:56 -04:00
Oliver Kowalke
2003e43d87
fix calling fn in future
2015-07-13 19:56:05 +02:00
Nat Goodspeed
bbdd101393
Snapshot of incomplete documentation review.
2015-07-10 09:47:11 -04: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
cdcbbf09a7
unit-test with member-fn
2015-06-24 18:23:11 +02: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
9a27f6f363
fix unit-tests, check for C+11/14 features
2015-06-21 19:01:14 +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
9d246ae680
enable compiling with atomics per default
2015-06-20 12:27:51 +02:00