Commit Graph

34 Commits

Author SHA1 Message Date
oliver Kowalke
20ca3705e7 pass stack-allocator to fiber in async()
- stack-allocator was mistakenly passed as argument to packaged_task<>
- additional overload for async() taking stack-allocator for fiber and
  allocator for packaged_task<>
2017-01-12 09:11:25 +01: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
cf47ee0eb7 update docu 2016-05-08 13:51:38 +02:00
Oliver Kowalke
e3ebf6f6ef rename "launch_policy" to "launch" 2016-05-08 10:01:52 +02:00
Nat Goodspeed
8f59f54dff Add documentation for launch_policy.
Add fiber() and async() overloads accepting launch_policy.

Now that we have launch_policy documentation, cross-link it where it's
mentioned in integration.qbk.
2016-04-29 17:58:49 -04:00
Oliver Kowalke
57267ec957 remove support for fiber interruption 2016-04-19 18:16:31 +02:00
Oliver Kowalke
884bd21c4d reintroduce future<>::get() specializations in future.qbk 2016-02-16 08:15:48 +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
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
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
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
Nat Goodspeed
a0490413cd Further work on futures documentation.
Explain "shared state", and provide links to the explanation wherever it's
referenced.

We don't need the doc to enumerate 'R& future<R&>::get()' or 'void
future<void>::get()' separately from 'R future<R>::get()': all three
specializations are exactly as the reader expects, given the generic
template (unlike shared_future, where it's useful to spell them out).

Encapsulate some of the necessary redundancies between future and
shared_future documentation.

Explain the effect of promise::set_value() vs. promise::set_exception() on
each of [shared_]future::get(), get_exception_ptr(), wait(), wait_for() and
wait_until().

Add get_exception_ptr() method to shared_future exposition class.

Clarify distinction between shared_future move assignment vs. copy assignment.

Document that async() is now variadic. Document its StackAllocator overload,
and the effect of passing StackAllocator. Remove warning about launch policy
'deferred' since async() has no launch policy parameter.
2015-08-12 16:32:54 -04:00
Oliver Kowalke
2d07f7b47b documentation: future throw fiber_interrupted 2015-07-29 10:58:26 +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
Oliver Kowalke
3b9382f8df update docu 2015-02-14 11:11:11 +01:00
Oliver Kowalke
2f19be6d67 use C++11 2014-12-27 19:07:42 +01:00
Oliver Kowalke
bdab3735ed update docu 2014-09-12 16:58:07 +02:00
Oliver Kowalke
c161e095af docu update 2014-09-09 21:02:12 +02:00
Oliver Kowalke
c005bb2c8f doc update 2014-09-09 20:40:26 +02:00
Oliver Kowalke
491012776f update docu 2014-09-05 17:55:49 +02:00
Oliver Kowalke
32d4a056d0 update documentation 2014-08-20 17:37:47 +02:00
Mario Lang
d471d7133d Fix some typos. 2013-12-29 14:00:36 +01:00
Nat Goodspeed
e436bc991d Add class_heading, member_heading et al. QuickBook templates and use for cross-referencing. 2013-11-08 18:30:11 -05:00
Oliver Kowalke
de58203ea8 docu 2013-10-14 19:31:43 +02:00
Oliver Kowalke
9b1a76ad2f docu 2013-10-14 19:24:43 +02:00
Oliver Kowalke
3a0d0309e5 docu 2013-10-14 17:24:37 +02:00
Oliver Kowalke
4f60f804ff docuemtnation update 2013-10-13 11:01:38 +02:00
Oliver Kowalke
49cb3692bd docu 2013-09-26 20:27:25 +02:00
Oliver Kowalke
13e52fdb23 docu 2013-09-16 17:33:15 +02:00
Oliver Kowalke
f06b6cf0d4 fix auto-link in config.hpp 2013-08-13 10:27:02 +02:00
Oliver Kowalke
81e62e8962 changed directory structure as required by modularized-boost 2012-12-09 15:22:59 +01:00