oliver Kowalke
68c2e775d8
fix asio example: use context::schedule
2017-03-06 13:36:33 +01:00
oliver Kowalke
8496dbf9c8
remove unused example
2017-03-03 09:48:11 +01:00
oliver Kowalke
8d53732808
fix renaming of ready_queue_type in examples
2017-03-03 08:15:38 +01:00
Oliver Kowalke
89dbbbdf69
fix example ping_pong
2017-02-26 11:11:37 +01:00
oliver Kowalke
2f3ca28af7
modify example ping-pong
2017-01-24 13:54:20 +01:00
Oliver Kowalke
7843617641
fix asio integration, thx to Arnaud Kapp
2016-11-24 19:25:21 +01:00
oliver Kowalke
de58b076eb
fix asio example: scheduler-algorithm should not spin
2016-11-18 08:29:20 +01:00
Oliver Kowalke
fa071c27cf
use SPMC (chase-lev algoritm) for ready-queue (work stealing)
2016-11-03 11:05:51 +01:00
Oliver Kowalke
b53e167a68
support for channels refactored
...
- buffered_channel: MPMC with lock-free guarantees
- unbuffered_channel: rendezvous point
2016-10-30 19:33:49 +01:00
Oliver Kowalke
ce962f9688
(un)bounded_channel renamed to (un)bounded_queue
2016-10-13 20:17:01 +02:00
Oliver Kowalke
97ce37e8e8
update asio examples
2016-10-10 08:50:10 +02:00
Oliver Kowalke
c9fd43549b
remove example work_stealing
2016-05-22 18:15:49 +02:00
Oliver Kowalke
1f81bc2a5f
Merge branch 'exp' into develop
2016-05-22 07:20:22 +02:00
Oliver Kowalke
8bd1006634
add random_chase_lev algorithm
2016-05-16 14:25:19 +02:00
Oliver Kowalke
310f3ce2f2
move sched_algorithm to algo::algorithm
...
- new namesapce algo
- shared_round_robin with shared ready queue
2016-05-13 20:14:48 +02:00
oliver Kowalke
4d47c74911
examples work sharing/stealing: spin in suspend_until()
...
- no fiber will sleep in both examples
- threads spin in dispatcher-fiber calling sched_algo::suspend_until()
because thread should not be blocked if no ready fiber is available
2016-05-09 12:00:37 +02:00
oliver Kowalke
19fcdf5d2c
fix example adapt_callback: wrap callback+args for C++11
2016-05-03 09:29:27 +02:00
Nat Goodspeed
ff35fc1f25
Flesh out doc for context::attach() and detach() + migration notes.
2016-05-02 15:56:11 -04:00
Nat Goodspeed
f910b356cc
Fix spelling of "thief" (stolen h)
2016-05-02 15:03:11 -04:00
Oliver Kowalke
968c32c842
replace context::migrate() by context::attach()/context::detach()
2016-05-02 18:56:17 +02:00
oliver Kowalke
aa3ad60d07
example asio: errors mentioned by clang
2016-05-02 08:19:36 +02:00
Oliver Kowalke
f89e5fc7e8
isoem fixes for example adapt_callback
2016-05-01 19:02:57 +02:00
Nat Goodspeed
0e2f382285
Bind promise with init capture if available, else use std::bind.
2016-05-01 10:33:54 -04:00
Nat Goodspeed
a783ec1356
caught typo
2016-04-29 16:49:10 -04:00
Nat Goodspeed
88f5f06fed
Describe updated Fiber / Asio round_robin integration.
2016-04-29 16:26:01 -04:00
Nat Goodspeed
56a3e7a92e
Make round_robin::suspend_until() always set asio timer.
...
This gives notify() something to cancel if need be.
Avoid resetting the timer to the same abs_time, though.
2016-04-29 09:05:20 -04:00
oliver Kowalke
d09eb503b8
example asio/autoecho: run server-fiber detached
2016-04-28 08:15:40 +02:00
oliver Kowalke
d53d0e8d99
example asio: remove counter_ in asio/round_robin
2016-04-28 07:50:11 +02:00
Oliver Kowalke
f91c0bb3aa
example asio: remove run_svc()
2016-04-27 19:54:52 +02:00
Oliver Kowalke
b2ba1459fa
example asio/round_robin: adjust namespaces
2016-04-27 19:47:30 +02:00
Oliver Kowalke
aa95b98aac
example autoecho: adjust output
2016-04-27 19:34:54 +02:00
Oliver Kowalke
1f13073372
example autoecho: call io_service::stop() in echo-server
...
- echo-server has to call io_service::stop() if it was signaled
to stop accepting new connections
2016-04-27 19:33:11 +02:00
Oliver Kowalke
a1638ad92c
example autoecho: stop acceptor
...
- call acceptor::stop() in the alst echo-client in order to stop
acceptor
2016-04-27 19:30:39 +02:00
Oliver Kowalke
8681668213
rename example autoecho
2016-04-27 19:14:48 +02:00
oliver Kowalke
e8f3641ae6
remove shared-ready-queue from asio/round_robin
2016-04-26 14:35:30 +02:00
Oliver Kowalke
e29082cea1
remove example asio/echo, make autoecho single threaded
2016-04-25 19:08:07 +02:00
oliver Kowalke
768ca27f1a
example work_stealing: use std::deque<> as ready-queue
2016-04-25 10:30:33 +02:00
Oliver Kowalke
16f4324422
example autoecho: start all fibers in main thread first
2016-04-24 18:36:28 +02:00
Oliver Kowalke
19ad46c9a2
make example echo single threaded
2016-04-24 18:36:14 +02:00
Oliver Kowalke
57267ec957
remove support for fiber interruption
2016-04-19 18:16:31 +02:00
oliver Kowalke
5027d3526f
impl. remote-ready-queue with std::vector<>
2016-04-18 12:52:48 +02:00
oliver Kowalke
0a911f4ab5
some modifications for autoecho example
2016-04-14 09:14:20 +02:00
oliver Kowalke
cd24224008
change asio examples regarding to run_svc()
2016-04-12 08:39:25 +02:00
oliver Kowalke
76127cc268
asio example: scheduler must not move lambda
...
- the lambda posted inside iasio::rond_robin will be shared by different
threads running io_service::run()
- the lambda must remain/executed by the thread
- re-introduction of run_svc() method
2016-04-12 08:31:49 +02:00
oliver Kowalke
171b2be879
assert in autoecho aexample
...
- assert if context, that has to be migrated, is equal to active context
because that should never be possible
2016-04-11 08:21:34 +02:00
Nat Goodspeed
9b3559dd49
Remove 'yield_hop' and the whole allow_hop_ mechanism.
...
Given the necessity for fibers::asio::round_robin to share its ready queue
among all threads calling io_service::run() on the same io_service instance,
the capability to allow hop (or not) in the fibers::asio::yield mechanism is
redundant.
2016-04-06 12:17:35 -04:00
Nat Goodspeed
f13c24bd66
Launch client fibers on alternate thread.
2016-04-06 12:17:34 -04:00
Nat Goodspeed
e2d4738c2a
Merge branch 'develop' of github.com:nat-goodspeed/boost-fiber into develop
2016-04-05 21:18:33 -04:00
Nat Goodspeed
3b9c8f0b46
Add autoecho.cpp to drive echo client/server automatically.
2016-04-05 21:17:35 -04:00
Nat Goodspeed
abfc4cab2a
Defend yield_handler_base::operator() against immediate callback.
...
If the async operation invoked by the asio async function immediately calls
yield_handler_base::operator() even before control reaches
async_result_base::get(), which would suspend the calling fiber, the context*
bound by yield_handler_base's constructor is still the active() context. This
may not be passed to context::migrate(). It probably shouldn't be passed to
context::set_ready(), either.
2016-04-02 12:16:17 -04:00