Oliver Kowalke
6034c1b09b
reenable Nat's promise_handler impl
2015-12-05 15:14:54 +01:00
Oliver Kowalke
3319841788
use spinlock_lock+context instead of function<>
2015-12-03 17:57:00 +01:00
Oliver Kowalke
726d4d51b9
++14 polishing
2015-12-01 21:07:11 +01:00
Oliver Kowalke
ca655a84d9
execute func + set active fiber inside context::resume()
2015-11-22 14:28:09 +01:00
Oliver Kowalke
a71e19ec4b
fix work-stealing example
2015-11-11 07:18:32 +01:00
Oliver Kowalke
5973f6a262
add work-stealing example
2015-10-21 15:26:55 +02:00
Oliver Kowalke
f743b63bc0
replace context::attach()/detach() by context::migrate()
2015-10-21 15:25:12 +02:00
Oliver Kowalke
edd439233a
fixups for asio examples
2015-10-17 14:41:53 +02:00
Oliver Kowalke
5345d810a8
asio: executed dummy fiber after sleep-timer expires
2015-10-14 13:43:14 +02:00
Oliver Kowalke
51c1a96c4d
introduce attach/detach of context
2015-10-14 13:37:44 +02:00
Oliver Kowalke
7617b74e57
remove second unlinking from worker-queue in work-sharing example
2015-10-12 22:05:15 +02:00
Oliver Kowalke
c07115115c
work sharing example: some modifications
2015-10-12 18:55:54 +02:00
Oliver Kowalke
0deb75a699
modify work-sharign example
2015-10-12 18:44:21 +02:00
Oliver Kowalke
380e8b30c1
use atomic coutner for remainng fibers
...
- instead of using scheduling_algorithm::has_ready_fibers() use
a atomic counter as termination indication
- scheduling_algorithm::has_ready_fibers() returns true even if
only main-context and dispatcher-context are ready -> false indication
for work-sharing example
2015-10-11 12:01:30 +02:00
Oliver Kowalke
d4c7232fa2
modify work-sharing example
2015-10-11 08:41:49 +02:00
Oliver Kowalke
ecab1c5ee6
work-sharing example
2015-10-10 21:51:14 +02:00
Oliver Kowalke
b032457397
asio examples added
2015-10-10 21:50:22 +02:00
Oliver Kowalke
ae67ee1694
asio's spawn()
2015-10-05 19:23:16 +02:00
Oliver Kowalke
5d71a4f8cd
asio examples
2015-10-04 20:08:21 +02:00
Oliver Kowalke
5357f7038e
scheduling-algorithm handles empty ready-queue
...
- if dispatcher-context detects empty ready-queue
the scheduler has to be suspended till signaled or
timeout reached
2015-10-03 09:35:47 +02:00
Oliver Kowalke
275ae3b981
add additional examples
2015-09-30 17:38:44 +02:00
Oliver Kowalke
48d652adab
add example wait_stuff
2015-09-29 20:27:33 +02:00
Oliver Kowalke
6d24450d40
example futures_mt removed
2015-09-29 20:26:35 +02:00
Oliver Kowalke
253d981f52
examples added
2015-09-29 17:55:46 +02:00
Oliver Kowalke
d0cb6e6756
some examples
2015-09-22 21:10:14 +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
070606d2d1
disable asio examples
...
- interaction with external event-loops not implemented
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
e44a41b71e
add output 'done' at the end of examples
2015-09-11 18:41:46 +02:00
Oliver Kowalke
2173200c14
example simple
2015-09-10 18:07:41 +02:00
Nat Goodspeed
c9bd8360b4
Merge branch 'develop' of http://github.com/olk/boost-fiber into develop
2015-09-09 21:47:46 -04:00
Nat Goodspeed
2b6135364e
Make awakened() unconditionally insert fiber.
...
There was a bug when the ready queue wasn't empty, but there was no
lower-priority fiber already in the queue. In that case the fiber wouldn't be
inserted. We want the loop just to advance the iterator, but to perform the
insert regardless of where the iterator ends up. (With this logic, empty() is
no longer a special case.)
Restore the ~Verbose() message.
2015-09-09 21:46:35 -04:00
Oliver Kowalke
513204a75e
add termination output to example simple.cpp
2015-09-09 21:11:02 +02:00
Nat Goodspeed
268922a9e6
Merge branch 'develop' of http://github.com/olk/boost-fiber into develop
2015-09-09 13:51:50 -04:00
Oliver Kowalke
c89410dfd8
uses intrusive::list<> isntread hand-written queues
2015-09-09 19:22:54 +02:00
Oliver Kowalke
e4fc7e7736
restore simple example
2015-09-08 21:35:46 +02:00
Oliver Kowalke
2cd1d39f12
fix clang compiler error regarding missing typename
2015-09-08 18:58:36 +02:00
Nat Goodspeed
6702d7cb9c
Merge branch 'develop' of http://github.com/olk/boost-fiber into develop
2015-09-08 06:21:33 -04:00
Oliver Kowalke
5854743a0a
force segfault in work-sharing example
2015-09-07 22:24:20 +02:00
Oliver Kowalke
3200e419d2
increase amount of fibers and threads
2015-09-07 20:58:22 +02:00
Nat Goodspeed
f28b6fc497
Update shared_ready_queue::main_fiber comments.
2015-09-07 14:55:30 -04:00
Nat Goodspeed
6cf8f4627f
Update work_sharing to never share a thread's main fiber.
...
Instead, when the main fiber is passed to awakened(), stash it in a separate
slot and make pick_next() return it only when the shared queue is empty.
Update ready_fibers() to include a non-empty main_fiber slot.
2015-09-07 14:50:55 -04: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
4dc5aaab59
add example of work-sharing
2015-09-07 11:53:13 +02:00
Oliver Kowalke
bc044fbed2
stuff
2015-09-06 21:36:06 +02:00
Nat Goodspeed
d653cbdcc6
Finish proofreading pass.
...
Add a note to the condition_variable::wait_for(..., pred) overload.
fiber_specific_ptr::reset() has no default argument.
Remove mention of launch policy deferred, since no API accepts a launch
policy argument.
Copy construction or copy assignment of a shared_future leaves other.valid()
unchanged. It won't be 'true' unless it was 'true' before.
Mention that [shared_]future::get_exception_ptr() does not invalidate.
Note that 'blocks' and 'suspends' are used interchangeably.
Add some cross-references; add link to std::allocator_arg_t. Clarify the
cross-reference to the paragraph describing BOOST_FIBERS_NO_ATOMICS.
Reformat some overly-long source lines.
2015-09-03 09:16:09 -04:00
Nat Goodspeed
bcdb555821
Use std::shared_ptr and std::make_shared for promise_handler.
...
Publish promise_handler::promise_ptr and use it in asio_handler_invoke() for
consistency.
2015-09-03 08:47:25 -04:00
Oliver Kowalke
be3d67a109
add end marker to example priority
2015-09-02 20:29:09 +02:00