Commit Graph

66 Commits

Author SHA1 Message Date
Oliver Kowalke
c8f3f405a7 fox docu
- in context of #168
2018-02-26 19:42:13 +01:00
Oliver Kowalke
81a20f8d7e documentation: running with worker threads 2017-11-07 19:08:09 +01:00
Oliver Kowalke
51f4944d93 update docu 2017-11-02 20:13:53 +01:00
Oliver Kowalke
ff7a27f0c1 documentation 2017-05-26 15:53:18 +02:00
Oliver Kowalke
11472ef1b5 documentation update 2017-05-07 08:09:43 +02:00
Oliver Kowalke
6cabe0be85 documentation: section 'optimization' 2017-04-23 10:19:52 +02:00
oliver Kowalke
5c9d4e7cdd fix documentation related to channels 2017-03-08 08:09:07 +01:00
Oliver Kowalke
290f1ff5ed update documentation
- section performance updated
- subsection tweaking
2016-11-09 08:16:28 +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
b1f609ea60 Revert "macro BOOST_FIBERS_SPINLOCK_YIELD added"
This reverts commit 550c164773.

- prevent CPU burning
- pause CPU while bussy waiting (pause() ... Linux kernel cpu_relax())
  instead
2016-10-21 17:13:56 +02:00
Oliver Kowalke
550c164773 macro BOOST_FIBERS_SPINLOCK_YIELD added
- if BOOST_FIBERS_SPINLOCK_YIELD is defined,
  spinlock::lock() calls std::this_thread::yield() if busy waiting
2016-10-16 10:11:23 +02:00
Oliver Kowalke
ce962f9688 (un)bounded_channel renamed to (un)bounded_queue 2016-10-13 20:17:01 +02:00
oliver Kowalke
187a45a1de update link in docu 2016-09-12 13:31:10 +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
968c32c842 replace context::migrate() by context::attach()/context::detach() 2016-05-02 18:56:17 +02:00
Nat Goodspeed
ba171ee066 Fix the expansion of __run_service__ to abbreviated run_svc() name.
Also make __io_service__ expand to a link to Asio documentation.
2016-04-30 10:14:46 -04:00
Nat Goodspeed
f4bc10e331 Add [,] template for curly apostrophe.
Also add [s] and [t] templates so we can write it[s] rather than it[,]s and
isn[t] rather than isn[,]t.

Remove extraneous spaces from inline template definitions: the spaces were
considered part of the template expansion! This was causing odd spacing where
those templates were used.
2016-04-30 10:10:32 -04:00
Oliver Kowalke
57267ec957 remove support for fiber interruption 2016-04-19 18:16:31 +02:00
Oliver Kowalke
cd92c2b003 update docu 2016-03-04 19:10:22 +01:00
Oliver Kowalke
6f0caee2e7 docu: make isntalltion section an appendix 2016-02-18 19:23:55 +01:00
Oliver Kowalke
d8124ab12f disable section 'installing' at first 2016-02-16 08:12:33 +01:00
Nat Goodspeed
87551c5419 Snapshot of ongoing pass through Fiber documentation.
Highlight predicate condition_variable::wait() method in condition_variable
front matter.

Rewrite the explanation of wait()'s Precondition.

Add a condition_variables subsection about no spurious condition_variable
wakeups. Remove "or spuriously" from wakeup conditions in wait*() methods.
First pass through "spurious wakeup" section in Rationale.

First pass through migration.qbk. Use lock_t throughout work_sharing.cpp,
instead of lock_t, lock_count and explicit std::unique_lock<std::mutex>
declarations. Unify treatment of main and dispatcher fibers.

Clarify thread-safety requirements on sched_algorithm::notify() and
suspend_until().

Clarify disable_interruption when rethrowing fiber_interrupted.

Consolidate future<T>::get(): returns T whether T is R, R& or void.

Mention nesting of disable_interruption (which matters) versus nesting of
restore_interruption (which doesn't). Mention that a disable_interruption
constructed within the scope of another disable_interruption is a no-op, both
itself and when passed to restore_interruption.

When packaged_task::operator()() stores a value or an exception, state "as if"
by promise::set_value() or set_exception(): the shared state is set ready.
Similarly for ~packaged_task() and ~promise() setting broken_promise.

Sprinkle links to the Allocator concept, std::allocator and
std::allocator_arg_t where referenced. Similarly for StackAllocator.

Add more cross-reference links where Fiber classes and methods are mentioned.
Also things like std::unique_lock and std::mutex.

Clarify error condition for value_pop() when channel is close()d.

Since fiber_specific_ptr::release() does not invoke cleanup, it should not
throw an exception raised during cleanup.
2016-02-11 11:27:26 -05:00
Nat Goodspeed
4146812990 Add 'Installing and Running Tests' section.
Add ["text] macro for enclosing "text" in curly double quotes.
2016-02-09 20:14:45 -05:00
Nat Goodspeed
3b9e9a3a56 Snapshot of documentation update for 2016 review.
Note effect of BOOST_USE_SEGMENTED_STACKS if StackAllocator is not explicitly
passed.

Introduce function_heading_for QuickBook template to allow separate
descriptions of swap(fiber), swap(packaged_task) and swap(promise).

Document async() using C++14 std::result_of_t and std::decay_t, aligning with
std::async() documentation.

Rework when_any / when_all examples to use unbounded_channel throughout, since
we always close() the channel after the first value anyway. bounded_channel
doesn't really add much value here.

Make wait_first_outcome_impl() infer its channel pointer type. That way we can
reuse that function instead of coding a separate wait_all_until_error_impl(),
which differs only in using the nchannel facade instead of directly pushing to
unbounded_channel.

Explain use of std::bind() to bind a lambda.

Use a more nuanced discussion of promise lifetime in write_ec() example
function.

Use condition_variable::wait(lock, predicate) in a couple places in
work_sharing.cpp example.
2016-02-06 23:17:04 -05:00
Oliver Kowalke
1f33787ade update docu 2016-01-20 19:42:40 +01:00
Oliver Kowalke
34be91cb3c update docu migration 2016-01-17 21:08:29 +01:00
Oliver Kowalke
d541e88a4b update documentation 2015-12-29 15:04:13 +01: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
ec251c3c02 Add wait_first_success() description. 2015-08-30 19:28:44 -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
a8debb9201 Add first when_any passage (wait_first_simple())... work in progress. 2015-08-29 19:42:53 -04: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
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
Nat Goodspeed
a2b18c51de Fix cross-references to other Boost libraries, per Paul Bristow.
As Paul points out, links of the form [@boost:/libs/something/index.html] (as
recommended by
http://www.boost.org/doc/libs/release/doc/html/quickbook/syntax/phrase.html#quickbook.syntax.phrase.links)
do not work when generating PDF, or even when locally generating just one
library's HTML documentation. He suggests linking explicitly to the relevant
boost.org URL. This is much more satisfying as the link can be tested.
2015-08-17 08:26:07 -04: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
7a7e10295d Track renamed rationale.qbk. Move it just after overview.qbk. 2015-08-14 11:22:13 -04:00
Oliver Kowalke
dc8af4ea7a documentation: remove refrence to boost.chrono ad boost.move 2015-08-06 17:21:29 +02:00
Oliver Kowalke
37b22812f8 documentation: note about thread-safe synchronization
- note added to section 'Synchronization"
2015-07-29 11:35:01 +02:00
Oliver Kowalke
1c139895e0 documentation: rename queue.qbk -> channel.qbk 2015-07-29 10:25:18 +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
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
Nat Goodspeed
bbdd101393 Snapshot of incomplete documentation review. 2015-07-10 09:47:11 -04: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
ca7e8be37c update docu 2015-05-23 18:27:08 +02:00
Oliver Kowalke
e1bd9b8151 docu 2015-04-18 13:23:08 +02:00
Oliver Kowalke
3b9382f8df update docu 2015-02-14 11:11:11 +01:00
Oliver Kowalke
13bf486fea update stack-allocators 2015-02-06 18:29:26 +01:00
Oliver Kowalke
c005bb2c8f doc update 2014-09-09 20:40:26 +02:00
Oliver Kowalke
f20cb844e5 documentation of performance 2014-02-22 20:02:38 +01:00
Nat Goodspeed
7eca9fb5fb Document set_scheduling_algorithm().
Add cross-references for that and for algorithm, round_robin and
round_robin_ws.
2013-12-03 22:41:25 -05:00