Commit Graph

323 Commits

Author SHA1 Message Date
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
Oliver Kowalke
52c03cb5fd fix merge error 2015-09-02 19:56:26 +02:00
Oliver Kowalke
ba35ac6de2 update documentation 2015-09-02 19:43:33 +02:00
Oliver Kowalke
a173c047a6 update documentation 2015-09-02 19:41:08 +02:00
Nat Goodspeed
37a0490bbd Fix bug in this_fiber::properties<>().
When the running thread's main fiber calls this_fiber::properties<>() without
yet having passed through sched_algorithm_with_properties::awakened(), which
is what actually instantiates the fiber_properties subclass, you could end up
without a properties instance. Fortunately there's an easy workaround: call
yield().

Remove that workaround from examples/priority.cpp.
2015-09-01 20:21:13 -04:00
Nat Goodspeed
aeaef6510f Reverse advice about when to set the properties for a new fiber.
Change which example code we show for this_fiber::properties<>() and
fiber::properties<>().
2015-09-01 19:55:33 -04:00
Nat Goodspeed
11b06c25dd Fix bug in priority_scheduler::property_change().
The complex logic to make a single pass through the ready queue to find the
old location and also the new insertion point was unfortunately error-prone.
Recast it as two separate passes: a simple search loop to find and unlink the
fiber_context*, then a call to awakened() to reinsert it in the correct place.
2015-09-01 19:16:47 -04:00
Oliver Kowalke
82143be5aa update documentation + formating 2015-09-01 17:32:07 +02:00
Oliver Kowalke
fefffd37eb update documentation 2015-09-01 17:17:38 +02:00
Oliver Kowalke
5f6df41bc7 first part of formating example wait_stuff 2015-08-31 21:53:47 +02:00
Nat Goodspeed
e3bb470376 Fill in section on adapting to nonblocking I/O. 2015-08-31 11:29:26 -04:00
Nat Goodspeed
2ed2bb4827 Add when_all_members() description. 2015-08-31 10:38:40 -04:00
Nat Goodspeed
f15fccb4b9 Add wait_all_collect_errors() description. 2015-08-31 10:08:31 -04:00
Nat Goodspeed
cc8acb1fee Add wait_all_until_error(), wait_all_until_error_source() description. 2015-08-31 10:00:38 -04:00
Nat Goodspeed
56191d5190 Add wait_all_values(), wait_all_values_source() description. 2015-08-31 08:15:06 -04:00
Nat Goodspeed
5cb215f741 Add wait_all_simple() description. 2015-08-30 20:49:45 -04:00
Nat Goodspeed
53127efe42 Add wait_first_value_het() description. 2015-08-30 19:56:40 -04:00
Nat Goodspeed
ec251c3c02 Add wait_first_success() description. 2015-08-30 19:28:44 -04:00
Nat Goodspeed
bed11fe0a1 Add wait_first_outcome() description. 2015-08-30 18:42:50 -04:00
Nat Goodspeed
2c36b37122 Answered my own question about exception in detached fiber. 2015-08-30 17:41:20 -04:00
Nat Goodspeed
34ec067a1f Add QuickBook markup for wait_first_value() section. 2015-08-29 21:34:55 -04:00
Nat Goodspeed
a8debb9201 Add first when_any passage (wait_first_simple())... work in progress. 2015-08-29 19:42:53 -04:00
Nat Goodspeed
ad1d3d118a Introduce wait_all_members_get() to restore asynchrony.
Passing the futures from the argument-pack functions through a function-call
boundary forces the runtime to perform all the async() calls _first,_ then
make a separate pass through the futures to obtain results.
2015-08-29 14:17:45 -04:00
Nat Goodspeed
9c1b412f7e Naive implementation of wait_all_members() is in fact synchronous. 2015-08-29 14:05:23 -04:00
Nat Goodspeed
f384143d04 Add wait_all_collect_errors() plus example usage. 2015-08-29 13:26:52 -04:00
Nat Goodspeed
5e30a4647b Add wait_all_until_error(), wait_all_until_error_source(), plus examples. 2015-08-29 13:10:01 -04:00
Nat Goodspeed
9c7a0b7bc5 Add wait_all_values(), wait_all_values_source(), plus example usage. 2015-08-29 12:35:25 -04:00
Nat Goodspeed
e9a234d06b Intersperse example calling code with implementations.
Introduce Runner and Example classes to collect and ultimately run lambdas
illustrating use of each different wait_something() variant.

Move Verbose up to the top for use by Runner. Similarly, move sleeper() for
use by those lambdas.

The body of main() then reduces to a Runner::run() call.
2015-08-29 09:08:20 -04:00
Nat Goodspeed
02eb362de5 wait_all_simple() can no longer share wait_first_simple_impl().
Now that wait_first_simple() is again based on Done (a bool protected by a
condition variable) rather than a barrier(2), have to introduce
wait_all_simple_impl() to manage the barrier.
2015-08-29 08:35:46 -04:00
Nat Goodspeed
ab32dbe34a Revert "Remove Done wrapper: fibers::barrier encapsulates that for us."
This reverts commit 59a3afd209, reinstating the
Done wrapper.

While it is true that a barrier(2) will wake up when the second fiber calls
wait(), it then _resets._ This means that the _third_ fiber will wait() for
the fourth, and so on. If an odd number of fibers binds that barrier, the last
of them will hang until shutdown.

We want Done.wait() to wake up on the first notify() call, and for every
subsequent notify() call to be a no-op. Apparently Done is the correct
mechanism after all.
2015-08-29 08:25:40 -04:00
Nat Goodspeed
0c25c3a179 Add wait_all_simple(). Surprisingly like wait_first_simple()! 2015-08-29 02:49:48 +00:00
Nat Goodspeed
59a3afd209 Remove Done wrapper: fibers::barrier encapsulates that for us.
You can wait on a barrier(2) to wait for exactly one more fiber to reach it --
exactly what we need for wait_first_simple().
2015-08-29 02:34:33 +00:00
Nat Goodspeed
fc8a7c612b Add wait_first_value_het() and example usage. 2015-08-29 02:27:16 +00:00
Nat Goodspeed
18ff2286ef Rename wait_any_blah() to wait_first_blah().
Generalize sleeper() task function to be able to return different types.
2015-08-29 02:07:39 +00:00
Nat Goodspeed
37f413c357 Snapshot of wait_stuff.cpp: several wait_any() variants working.
We now have:

wait_any_value(): for when passed functions cannot throw exceptions;

wait_first_outcome(): get earliest result/exception;

wait_first_success(): get first non-exception result.
2015-08-28 15:16:48 -04:00
Nat Goodspeed
76ae45d6c2 Merge branch 'develop' of github.com:nat-goodspeed/boost-fiber into develop 2015-08-26 13:18:25 -04:00
Nat Goodspeed
7af7bd2520 Merge branch 'develop' of http://github.com/olk/boost-fiber into develop 2015-08-26 13:10:31 -04:00
Oliver Kowalke
2601e72673 let sched_algo_ be managed by unique_ptr 2015-08-26 18:59:18 +02:00
Nat Goodspeed
8cce2bb668 Merge branch 'develop' of http://github.com/olk/boost-fiber into develop 2015-08-26 11:56:11 -04: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
0f7b6ae71c Add notes that echo_client.cpp and echo_client2.cpp are borrowed from asio.
The casual reader, on encountering these in the Fiber examples directory,
might otherwise assume they're intended to illustrate something about the
Fiber library.
2015-08-25 13:07:35 -04:00
Nat Goodspeed
c52a914906 Add examples/when_stuff.cpp illustrating when_any_simple().
when_any_simple() is "simple" in the sense that we don't care about return
values or possible exceptions -- we only want to know when the shortest
subtask completes.

This source is a work in progress. We intend to add more cases.
2015-08-25 10:13:25 -04:00
Oliver Kowalke
73d38028c4 code re-formating of asio examples 2015-08-24 20:08:56 +02:00
Oliver Kowalke
aa79e05d25 fix code format in examples 2015-08-24 19:52:00 +02:00
Nat Goodspeed
1e3e2b8887 Add callbacks.qbk about interfacing Fiber with async callbacks.
This covers both generic callbacks (adapt_callbacks.cpp,
adapt_method_calls.cpp) and custom Asio completion tokens (yield.hpp,
promise_completion_token.hpp, detail/yield.hpp, detail/promise_handler.hpp).
Mark up the relevant source files to provide code snippets for callbacks.qbk.
2015-08-24 09:28:16 -04:00
Nat Goodspeed
685ba8f16f Add examples/adapt_nonblocking.cpp.
This illustrates how Fiber can ease the problem of wrapping retries for
nonblocking I/O in an event-driven program.
2015-08-23 17:20:49 -04:00
Nat Goodspeed
68044bb349 Don't embed semantically meaningful function calls in assert(). 2015-08-23 17:15:30 -04:00
Nat Goodspeed
550aae5029 Add examples/adapt_method_calls.cpp.
This illustrates how to interface a synchronous Fiber function with an async
API whose notification consists of an abstract base class with virtual
success/error methods.
2015-08-23 11:53:33 -04:00
Nat Goodspeed
7beab5b285 Add examples/adapt_callbacks.cpp.
This illustrates a few different ways of using promise and future to interface
between an asynchronous callback and the Fiber library.
2015-08-23 11:17:10 -04:00
Nat Goodspeed
f3213aae54 use_future.hpp and yield.hpp no longer need handler_invoke_hook.hpp. 2015-08-22 14:43:16 -04:00
Nat Goodspeed
53d4f4b166 Reimplement boost::fibers::asio::yield with promise/future.
In essence, yield_t et al. become very like use_future_t et al. The only real
difference is the async_result return type and get() method. Factor out common
functionality into promise_completion_token and promise_handler.

Remove the boost::fibers::asio::spawn() function and its basic_yield_context
infrastructure. Fix up all existing references in example source code.
2015-08-22 14:22:20 -04:00
Nat Goodspeed
99db8d50a8 Add section about integration with another main loop.
Asio integration may be a much larger topic, per email.
2015-08-19 06:18:08 -04:00
Oliver Kowalke
2855e5128a fix asio stuff 2015-08-18 17:46:14 +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
Nat Goodspeed
2687814477 Merge branch 'develop' of github.com:olk/boost-fiber into sched-props-dev
Resolved conflicts:
	doc/condition_variables.qbk
	examples/cpp03/migration/workstealing_round_robin.cpp
	examples/cpp03/migration/workstealing_round_robin.hpp
	include/boost/fiber/algorithm.hpp
	include/boost/fiber/bounded_queue.hpp
	include/boost/fiber/detail/fiber_base.hpp
	include/boost/fiber/detail/fifo.hpp
	include/boost/fiber/detail/waiting_queue.hpp
	include/boost/fiber/detail/worker_fiber.hpp
	include/boost/fiber/fiber.hpp
	include/boost/fiber/fiber_manager.hpp
	include/boost/fiber/fixedsize_stack.hpp
	include/boost/fiber/operations.hpp
	include/boost/fiber/round_robin.hpp
	include/boost/fiber/unbounded_queue.hpp
	src/detail/worker_fiber.cpp
	src/fiber.cpp
	src/fiber_manager.cpp
	src/round_robin.cpp
2015-05-10 22:03:35 -04:00
Oliver Kowalke
f7f0dacc03 Update segmented_stack.cpp 2015-02-19 13:31:56 +01:00
Oliver Kowalke
e91e016fe8 Update segmented_stack.cpp 2015-02-19 08:37:12 +01:00
Oliver Kowalke
4d6403102b Update segmented_stack.cpp 2015-02-19 08:23:41 +01:00
Oliver Kowalke
ec2d9c6021 add asio examples 2015-02-12 16:29:01 +01:00
Oliver Kowalke
ee0b84240d remove asio examples 2015-02-10 18:45:26 +01:00
Oliver Kowalke
8cfec6deed some fixes for asio exmaples - not compiling 2015-02-10 18:40:40 +01:00
Oliver Kowalke
502581e1e1 remove example fiber-migration 2015-02-10 17:38:44 +01:00
Oliver Kowalke
aa337b07f7 move 'fm_' - free functions into fiber_manager 2015-02-08 16:02:22 +01:00
Oliver Kowalke
13bf486fea update stack-allocators 2015-02-06 18:29:26 +01:00
Oliver Kowalke
d1d7ad7aa0 use recursive-mutex in fiber-migration example 2015-01-19 18:13:51 +01:00
Oliver Kowalke
27c0a78d36 allocate fiber_context on stack 2015-01-13 14:57:32 +01:00
Oliver Kowalke
37747ece0d use fibers::mutext instead std::mutex in workstealing example 2015-01-05 19:58:07 +01:00
Oliver Kowalke
0fda6d1f88 remove some warnings 2015-01-04 13:13:15 +01:00
Oliver Kowalke
3b332c17ee variadric arguments 2015-01-01 14:40:39 +01:00
Oliver Kowalke
584dcdceee allocate/deallocate fiber_base via allocator 2014-12-29 17:38:01 +01:00
Oliver Kowalke
f6c7ab7826 rename (un)bounded_queue -> (un)bounded_channel + use allocator 2014-12-28 21:30:14 +01:00
Oliver Kowalke
44326ebdd3 remove priority 2014-12-28 08:35:44 +01:00
Oliver Kowalke
e9e8ec1b85 fix examples 2014-12-27 21:17:13 +01:00
Oliver Kowalke
2f19be6d67 use C++11 2014-12-27 19:07:42 +01:00
Nat Goodspeed
b5a75be2a0 Add priority.cpp example program.
This illustrates use of a sched_algorithm_with_properties<PROPS> subclass that
defines, and supports, a priority property. The example includes a (somewhat
contrived) case in which a fiber must be moved within the scheduler's ready
queue due to a priority change.
2014-11-19 10:47:06 -05:00
Nat Goodspeed
cb7b5ddd25 Introduce sched_algorithm_with_properties::awakened_props() method.
Every sched_algorithm_with_properties<PROPS> subclass awakened() call must
ensure that control reaches sched_algorithm_with_properties<PROPS>::awakened()
_before_ any logic in the subclass method attempts to access properties. This
turns out to be all too easy to forget.

So instead, advise subclasses to overrride new awakened_props() method. Base-
class method sets things up and then calls awakened_props(). Moreover, when
the compiler supports it, sched_algorithm_with_properties<PROPS>::awakened()
is now marked 'final' to remind subclass authors to override awakened_props()
instead.
2014-11-19 10:40:31 -05:00
Nat Goodspeed
f1a34d297f Remove 'priority' for every fiber, and its support methods.
Priority is another property that's only relevant for future sched_algorithm
implementations. We don't even have an example yet. It's a good candidate for
moving to a specific fiber_properties subclass for that specific
sched_algorithm implementation.
2014-11-11 18:00:18 -05:00
Nat Goodspeed
757d692cae Re-add thread_affinity specific to workstealing_round_robin.
thread_affinity is a good example of a property relevant only to a particular
sched_algorithm implementation. In examples/cpp03/migration, introduce an
'affinity' subclass of fiber_properties with a thread_affinity data
member.

Derive workstealing_round_robin from sched_algorithm_with_properties<affinity>
and, as required by that base class, forward awakened() calls to base-class
awakened() method.

Reimplement workstealing_round_robin's queue from a std::deque to a "by hand"
intrusive singly-linked list so we can efficiently remove an arbitrary item.
Make steal() method, instead of always popping the last item, scan the list to
find the last item willing to migrate (! thread_affinity).

From examples/cpp03/migration/workstealing_round_robin.hpp, an example of a
user-supplied sched_algorithm implementation, remove all boost/fiber/detail
 #includes. These should no longer be needed.

Change sched_algorithm_with_properties::properties(worker_fiber*) method to
accept fiber_base* instead. The original signature was introduced when every
sched_algorithm implementation necessarily manipulated worker_fiber* pointers.
Now we're intentionally avoiding the need.

For the same reason, introduce a fiber_properties::back_ptr typedef so
subclasses can opaquely pass such pointers through their own constructor to
the base-class constructor.
2014-11-11 16:15:25 -05:00
Nat Goodspeed
402a4353f7 Define sched_algorithm methods on fiber_base*, not worker_fiber*.
Some reviewers disliked that to build a custom sched_algorithm subclass, you
must necessarily manipulate pointers to classes in the boost::fibers::detail
namespace. Redefine all such methods to use fiber_base* rather than
detail::worker_fiber*.

Hoist fiber_base* into boost::fibers namespace. We considered an opaque
typedef rather than fiber_base*, but in fact a sched_algorithm subclass may
need is_ready().

Moreover, a sched_algorithm subclass may well want to use an intrusive linked
list to queue fibers. Hoist worker_fiber::nxt_ pointer into fiber_base, and
remove worker_fiber::next() and next_reset() methods. This allows recasting
detail::fifo in terms of fiber_base*, therefore round_robin can be stated
almost entirely in terms of fiber_base* rather than worker_fiber*.

Recast fiber constructor taking worker_fiber* to take fiber_base* instead.
This constructor is used solely for fiber migration; with relevant functions
now returning fiber_base*, we think we no longer need fiber(worker_fiber*).
2014-11-10 21:19:28 -05:00
Nat Goodspeed
3128334364 Initial cut at supporting arbitrary user-coded scheduler properties.
Introduce fiber_properties class from which to derive a specific properties
class for a particular user-coded sched_algorithm subclass.

Add sched_algorithm::property_change(worker_fiber*, fiber_properties*) method
to allow a fiber_properties subclass method to notify the sched_algorithm
subclass of a change in a relevant property. This generalizes the present
priority() method.

Introduce sched_algorithm_with_properties<PROPS> template class from which to
derive a user-coded scheduler that uses fiber_properties subclass PROPS. Give
it ref-returning properties(fiber::id) and properties(worker_fiber*) methods.

Introduce fiber_properties* field in worker_fiber, and initialize it to 0.
Delete it when the worker_fiber is destroyed. Give it pointer-flavored access
methods. Normally this field will remain 0; but the first time the
worker_fiber is passed to a sched_algorithm_with_properties<PROPS> subclass,
its awakened() method will instantiate the relevant PROPS subclass.

Add ref-returning fiber::properties<PROPS>() method. Calling this method
presumes that the current thread's sched_algorithm is derived from
sched_algorithm_with_properties<PROPS>.

Also add this_fiber::properties<PROPS>() with the same restriction.

Add ref-returning fm_properties<PROPS>() functions to implement
fiber::properties<PROPS>() and this_fiber::properties<PROPS>().

Allow sched_algorithm_with_properties to extract the worker_fiber* from a
fiber::id (aka worker_fiber::id) so it can present public-facing
properties(id) method as well as properties(worker_fiber*) method.
(cherry picked from commit 18c7f2c13b9642826b42aa3f6fa0a6642fce9cbc)

Conflicts:
	include/boost/fiber/detail/worker_fiber.hpp
	include/boost/fiber/fiber_manager.hpp
2014-11-08 11:03:51 -05:00
Oliver Kowalke
1c3b447716 some fixes 2014-09-26 17:57:53 +02:00
Oliver Kowalke
7483a729aa some fixes 2014-09-25 18:52:04 +02:00
Oliver Kowalke
7fb469cd10 some fixes 2014-09-24 19:18:44 +02:00
Oliver Kowalke
ae1ebd7b01 Revert "optimize the example for asio loop"
This reverts commit 61a8a8ea89.
2014-09-18 19:25:58 +02:00
Vincent Lee
61a8a8ea89 optimize the example for asio loop 2014-09-15 18:14:15 +08:00
Oliver Kowalke
c005bb2c8f doc update 2014-09-09 20:40:26 +02:00
Oliver Kowalke
0948d577dc fix examples 2014-08-23 14:09:21 +02:00
Oliver Kowalke
4b604ff93a test for multiple definitions 2014-08-21 17:28:28 +02:00
Oliver Kowalke
e24f27c75c fix publish-subscriber example 2014-08-21 17:27:53 +02:00
Oliver Kowalke
ef6c16e934 optimized server app in publish-subscribe example 2014-08-17 20:41:31 +02:00
Oliver Kowalke
22850775ca variadric tempalte args 2014-07-15 20:33:14 +02:00
Oliver Kowalke
7ef6302f86 arbitrary clock::time_point conforming to chrono clock concept allowed 2014-07-08 17:41:59 +02:00
Oliver Kowalke
5cf28979a5 queues should support value_pop() 2014-07-07 17:40:53 +02:00
Oliver Kowalke
b936512136 remove mutex::scoped_lock by unique_lock< mutex > 2014-06-29 13:31:01 +02:00
Oliver Kowalke
7116c7ff03 use fm_<xyz> functions in asio intregration files 2014-06-29 13:30:40 +02:00
Oliver Kowalke
e72e388843 enable other examples 2014-06-29 13:24:52 +02:00
Oliver Kowalke
d2eea37b53 use mutex + deque as ready-queue in example work-stealing 2014-06-23 18:05:06 +02:00
Oliver Kowalke
026003bb65 use the free fm_<xyz> - functions 2014-06-17 11:51:14 +02:00
Oliver Kowalke
f4defed2b5 workstealing example 2014-03-25 17:45:56 +01:00
Oliver Kowalke
b5b22ff606 workstealing example 2014-03-24 20:05:14 +01:00
Oliver Kowalke
e031ba4762 move asio-stuff to example section 2014-03-24 19:14:38 +01:00
Oliver Kowalke
ab91ab52b8 changes for boost.asio 2014-03-23 18:20:15 +01:00
Oliver Kowalke
9f7f74f662 use symmetric_coroutine<>::yield_type::operator()() 2014-03-15 19:16:13 +01:00
Oliver Kowalke
a1e3c1d081 merge from branch feature/tls 2014-03-08 10:16:22 +01:00
Oliver Kowalke
5b6d77b6b5 renaming of fiber classes 2014-03-05 17:30:11 +01:00
Oliver Kowalke
67111d3e58 workstealing round-robin scheduler moved to examples 2014-03-04 18:01:42 +01:00
Oliver Kowalke
2b37b33011 use asymmetric_coroutine<> from (coroutine branch develop) 2014-02-22 21:26:28 +01:00
olk
552c175be1 add some comments to publish-subscibe example 2014-01-07 08:46:26 +01:00
olk
a2611f032a change copy right in example/future_mt.cpp 2014-01-07 07:48:53 +01:00
Oliver Kowalke
8de7066392 fix library name in Jamfile 2013-12-30 15:33:13 +01:00
Oliver Kowalke
3cc7d06482 additional example for transfering future between threads 2013-12-29 22:21:44 +01:00
Mario Lang
d471d7133d Fix some typos. 2013-12-29 14:00:36 +01:00
Oliver Kowalke
7594f74568 add required compiler flags for segmentad-stacks 2013-12-08 15:02:49 +01:00
Oliver Kowalke
511b740ec2 default-scheduler allocated 2013-12-02 19:45:48 +01:00
Oliver Kowalke
64529df3b4 changed interface of (un)bounded_queue 2013-11-17 18:55:32 +01:00
Oliver Kowalke
393797a94e fix queues related to closed queue and poping values 2013-11-02 14:49:25 +01:00
Oliver Kowalke
bac5c197c0 remove queue::close() from ping_pong example 2013-11-02 14:21:32 +01:00
Oliver Kowalke
6bb976b4d3 fix queues 2013-11-02 14:15:05 +01:00
Oliver Kowalke
f04b484a21 fix test coein example simple.cpp 2013-10-28 13:38:22 +01:00
Oliver Kowalke
436883ca33 add workstealing round_robin 2013-10-25 18:01:56 +02:00
Oliver Kowalke
98f54ad0e4 rename fibers::asio::io_service -> fibers::asio::round_robin 2013-10-24 18:42:07 +02:00
Oliver Kowalke
ec8a11e60c atomic fiber::state_ 2013-10-17 19:21:26 +02:00
Oliver Kowalke
147d41833a remove exception example 2013-10-01 19:43:29 +02:00
Oliver Kowalke
500c1e605b example regarding to exceptions 2013-09-29 11:05:57 +02:00
Oliver Kowalke
4465d50c0c example interrupting fiber 2013-09-29 10:42:11 +02:00
Oliver Kowalke
2a6ea310a1 fix linkingissue 2013-09-28 16:53:04 +02:00
Oliver Kowalke
84d2a50491 fix Jamfiles and multithreading 2013-09-28 10:24:47 +02:00
Oliver Kowalke
32405f7a99 add asio example demonstaratiing sync. of fibers 2013-09-11 09:27:27 +02:00
Oliver Kowalke
e996d2e28f use coroutines inside fiber 2013-09-09 08:52:26 +02:00
Oliver Kowalke
00ec9d32a3 update 2013-08-28 21:57:14 +02:00
Oliver Kowalke
d91578120f fix libname 2013-08-18 22:14:10 +02:00
Oliver Kowalke
9d67164839 adapt io_service to wait-op requirements 2013-08-18 10:52:36 +02:00
Oliver Kowalke
3485f551aa add async() 2013-08-18 10:30:15 +02:00
Oliver Kowalke
94482d25b6 add time-point to schedulable fiber 2013-08-13 18:23:53 +02:00
Oliver Kowalke
f06b6cf0d4 fix auto-link in config.hpp 2013-08-13 10:27:02 +02:00
Oliver Kowalke
11eb0c6082 add boost.asio spawn() for fibers 2013-06-19 18:03:48 +02:00
Oliver Kowalke
9d58afd3ec add some examples using boost.asio async_result 2013-06-16 16:19:24 +02:00
Oliver Kowalke
de3bc64e4f boost.asio related stuff (fiber-aware io_servic etc.) 2013-06-14 20:37:47 +02:00
Oliver Kowalke
31c764b7bc some code clean-up 2013-06-14 16:53:46 +02:00
Oliver Kowalke
04ddde32f1 refactor of support of boost.asio async_result (use_future_t) 2013-06-13 17:39:03 +02:00
Oliver Kowalke
fc9938190e add example using boost.asio async_result feature 2013-06-12 16:58:45 +02:00
Oliver Kowalke
61c3fd4589 some fixes 2013-06-10 20:11:52 +02:00
Oliver Kowalke
9dfeb585d6 remove code for fiber migration 2013-03-19 17:44:43 +01:00
Oliver Kowalke
5ff11b0df4 example fiber-steeling updatedd 2013-03-16 19:57:15 +01:00
Oliver Kowalke
7ab57b66f7 examples updated 2013-03-16 19:54:59 +01:00
Oliver Kowalke
b752574dfa disable future tests and example 2013-02-27 20:16:03 +01:00
Oliver Kowalke
b4623a7e53 fix example join 2013-01-30 19:42:55 +01:00
Oliver Kowalke
9ad0ec1937 adapt examples 2013-01-30 19:16:19 +01:00
Oliver Kowalke
017039c3b5 addapt examples to new version 2013-01-12 21:16:46 +01:00
Oliver Kowalke
cfdcf1d16a interface algorithm, round_robin 2012-12-19 19:37:05 +01:00
Oliver Kowalke
1e248b0216 require to set scheduler for each os-thread 2012-12-17 19:54:34 +01:00
Oliver Kowalke
81e62e8962 changed directory structure as required by modularized-boost 2012-12-09 15:22:59 +01:00