Nat Goodspeed
f3d80ef589
Update some remarks about Asio; add cross-references.
2015-08-31 20:11:05 -04:00
Oliver Kowalke
5f6df41bc7
first part of formating example wait_stuff
2015-08-31 21:53:47 +02:00
Oliver Kowalke
6a1230f02f
fix formating in documentation
2015-08-31 21:32:12 +02:00
Oliver Kowalke
08c03a7583
Merge pull request #57 from nat-goodspeed/develop
...
Miscellaneous promised documentation tweaks
2015-08-31 19:09:02 +02:00
Nat Goodspeed
d8f82dfb09
Fix table descriptions, appending source-file links below each.
...
Too bad we can't embed such links within a table description.
2015-08-31 12:41:50 -04:00
Nat Goodspeed
b81a65c566
Add note about interrupting detached fiber at main-fiber shutdown.
2015-08-31 12:34:38 -04:00
Nat Goodspeed
58fa3add01
Change set_scheduling_algorithm() to use_scheduling_algorithm<>().
2015-08-31 12:21:53 -04:00
Nat Goodspeed
23bcafa0be
Add note about barrier reset behavior.
2015-08-31 12:03:52 -04:00
Nat Goodspeed
62d7060475
Discuss destroying future before corresponding promise::set_value().
2015-08-31 11:44:17 -04:00
Nat Goodspeed
b491696b54
Clarify that neither ~future() nor ~shared_future() blocks.
2015-08-31 11:37:42 -04:00
Oliver Kowalke
4b4c621fd3
Merge pull request #56 from nat-goodspeed/develop
...
Fill in section on nonblocking I/O.
2015-08-31 17:33:05 +02:00
Nat Goodspeed
86e7d4c062
Merge branch 'develop' of github.com:olk/boost-fiber into develop
2015-08-31 11:30:32 -04:00
Nat Goodspeed
e3bb470376
Fill in section on adapting to nonblocking I/O.
2015-08-31 11:29:26 -04:00
Oliver Kowalke
7b03d38ba1
Merge pull request #55 from nat-goodspeed/develop
...
Add document section about when_any, when_all semantics.
2015-08-31 17:20:03 +02: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
6d8821cf0b
Add cross-references between when_any examples.
2015-08-30 20:12:22 -04:00
Nat Goodspeed
53127efe42
Add wait_first_value_het() description.
2015-08-30 19:56:40 -04:00
Nat Goodspeed
7e9213779e
Break 'when_any' etc. into subsections.
...
This puts subsection entries into the table of contents.
2015-08-30 19:39:50 -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
93a73835b8
Add [mdash] template and use it to replace --.
...
Also place an anchor concerning uncaught exceptions.
2015-08-30 18:36:10 -04:00
Nat Goodspeed
70b79515bf
Correct phrasing for [xchannel_push_effects] template.
...
Affects wording for unbounded_channel::push(), bounded_channel::push().
2015-08-30 18:27:06 -04:00
Nat Goodspeed
2c36b37122
Answered my own question about exception in detached fiber.
2015-08-30 17:41:20 -04:00
Nat Goodspeed
4d1984e490
Add warning about tying lifespan of barrier to any waiting fiber.
2015-08-30 08:21:26 -04:00
Nat Goodspeed
34ec067a1f
Add QuickBook markup for wait_first_value() section.
2015-08-29 21:34:55 -04:00
Nat Goodspeed
455b160aad
Add wait_first_value() description.
2015-08-29 21:34:18 -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
c0425de728
Merge branch 'develop' of github.com:nat-goodspeed/boost-fiber into develop
2015-08-28 22:53:34 -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
81a2ab87c5
Merge branch 'develop' of github.com:nat-goodspeed/boost-fiber into develop
2015-08-28 15:22:10 -04:00
Nat Goodspeed
66b6a92e41
Merge branch 'develop' of github.com:olk/boost-fiber into develop
2015-08-28 15:21:56 -04:00
Nat Goodspeed
11eae7e31e
Merge branch 'develop' of http://github.com/olk/boost-fiber into develop
2015-08-28 15:20:50 -04: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
Oliver Kowalke
0192cb2833
fix formating in future.hpp
2015-08-28 16:59:16 +02:00
Nat Goodspeed
76ae45d6c2
Merge branch 'develop' of github.com:nat-goodspeed/boost-fiber into develop
2015-08-26 13:18:25 -04:00