2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-19 02:12:24 +00:00
Commit Graph

246 Commits

Author SHA1 Message Date
Oliver Kowalke
ff3da9ec0f fix typo in stack.qbk 2016-03-28 20:29:27 +02:00
Oliver Kowalke
6b490eb190 update stack.qbk 2016-03-28 20:23:08 +02:00
Oliver Kowalke
f3cb64fb91 update html 2016-03-28 18:15:14 +02:00
Nat Goodspeed
4ebc1ed2f4 Update fibers::asio::yield doc for current implementation. 2016-03-27 22:46:38 -04:00
Nat Goodspeed
85c0d26d11 Fix minor errors in doc generation. 2016-03-23 21:28:40 -04:00
Nat Goodspeed
f905cb4c3b Document context::suspend() and set_ready(). 2016-03-12 10:45:54 -05:00
Nat Goodspeed
d9e5bde625 Make a pass through enum class type and new context::is_context().
Do not document the specific values of enum class type values. Consuming code
should be based solely on enum names; their values are an implementation
detail.

Ensure that all enum class type values are mentioned in note for is_context()
method.
2016-03-07 21:17:56 -05:00
Nat Goodspeed
908bd3ca68 Fix up references to traits_type in stack allocation section.
Provide a link to Boost.Context's stack_traits documentation to look up
is_unbounded(), minimum_size() and maximum_size().

Fix spellings of minimum_size() and maximum_size().

When stack_traits::is_unbounded(), we shouldn't have to care about
stack_traits::maximum_size(). Consistently change:

    ! traits_type::is_unbounded() && size <= traits_type::maximum_size()

to:

    traits_type::is_unbounded() || size <= traits_type::maximum_size()
2016-03-07 21:14:37 -05:00
Nat Goodspeed
fb17dc13d4 Haskell has two L's -- see https://www.haskell.org/ 2016-03-07 20:51:58 -05:00
Oliver Kowalke
26ca17f4e5 docu related to skynet 2016-03-04 19:15:41 +01:00
Oliver Kowalke
cd92c2b003 update docu 2016-03-04 19:10:22 +01:00
Oliver Kowalke
3572b00e59 update docu regarding to performance 2016-02-28 15:56:54 +01:00
Oliver Kowalke
ccd6ebd974 update docu for stacks 2016-02-27 20:28:34 +01:00
Oliver Kowalke
58e745dcc3 documentation updated 2016-02-27 20:20:03 +01:00
Oliver Kowalke
6f0caee2e7 docu: make isntalltion section an appendix 2016-02-18 19:23:55 +01:00
Oliver Kowalke
fb11931689 Update scheduling.qbk 2016-02-16 08:30:50 +01:00
Oliver Kowalke
d5faf0c8fb fix docu for context::is_context() 2016-02-16 08:29:47 +01:00
Oliver Kowalke
884bd21c4d reintroduce future<>::get() specializations in future.qbk 2016-02-16 08:15:48 +01:00
Oliver Kowalke
d8124ab12f disable section 'installing' at first 2016-02-16 08:12:33 +01:00
Oliver Kowalke
8536cdd8fe migrate a running fiber (not thread) 2016-02-16 08:10:17 +01:00
Nat Goodspeed
de4b03cb21 Tweak new wording in Rationale section.
Add a link to the section "No Spurious Wakeups" in the condition_variable
section.

Make a pass over "migrating fibers between threads," adding a link to the
whole new section on that same topic.
2016-02-15 20:31:52 -05:00
Nat Goodspeed
ea0c16080b A few more documentation-related edits 2016-02-15 17:12:56 -05: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
963ab8a14a Clarify timed_mutex::try_lock*() error conditions. 2016-02-10 00:36:53 -05:00
Nat Goodspeed
3910baa6c8 Fix minor typo: 'an' execution context. 2016-02-10 00:28:47 -05:00
Nat Goodspeed
60e9a688ac Flesh out explanations of sched_algorithm::suspend_until(), notify().
Document boost::fibers::scheduler::ready_queue_t and expand on the
context::ready_link(), ready_unlink() and ready_is_linked() methods.

Explain migrate() restrictions on is_main_context() and
is_dispatcher_context() context instances.
2016-02-10 00:15:26 -05:00
Nat Goodspeed
900a367f92 Clarify that fiber_interrupted on thread's main fiber could terminate. 2016-02-09 21:01:21 -05:00
Nat Goodspeed
fa9cf0d0d2 Clarify disposition/propagation of fiber_interrupted exception.
There's a blanket statement under 'Exceptions' that any exception not caught
by a running fiber will cause the program to terminate. fiber_interrupted is
an exception to this rule: that exception will terminate the fiber, but not
the whole program.

Explain that when a fiber running packaged_task is terminated by
fiber_interrupted, and another fiber calls future::get() on the future from
that packaged_task, fiber_interrupted will be rethrown regardless of
disable_interruption. This is implicit in existing material, but worth making
explicit.

Explicitly state that a thread's main fiber may call (e.g.) this_fiber::yield().

[un]bounded_channel::try_{push,pop}() are not interruption_points. Remove them
from the big list.

Semantics of operator<(fiber, fiber) depend solely on operator<(fiber::id,
fiber::id). Restating semantics of the latter function not needed.

Add a note clarifying the phrase "timeout-related exceptions."
2016-02-09 20:26:04 -05:00
Nat Goodspeed
8f62e85583 Mention (with link) fiber migration in Overview section. 2016-02-09 20:22:32 -05:00
Nat Goodspeed
877baa7c8b Use ["text] template to replace "quotes" with curly double quotes. 2016-02-09 20:19:51 -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
f42fdca00f Use same .qbk source for condition_variable and condition_variable_any.
Wrap the full descriptive text for both classes in a QuickBook template
parameterized with class name and appropriate substitutions for the (few)
differences between the two classes.
2016-02-08 19:44:54 -05:00
Nat Goodspeed
00cad4c187 Fix argument syntax for a member_link template invocation. 2016-02-08 16:00:04 -05:00
Nat Goodspeed
32f11ec4c6 Eliminate ref to stack-allocator concept within heading that defines it.
This produced QuickBook warnings. Clean up those warnings.
2016-02-08 15:58:42 -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
81ac20b3dc remove autoreset_event 2016-01-24 16:12:44 +01:00
Oliver Kowalke
a36d229000 update docu 2016-01-20 19:45:14 +01: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
aaf9dde6eb docu 2016-01-14 20:20:09 +01:00
Oliver Kowalke
d541e88a4b update documentation 2015-12-29 15:04:13 +01:00
Oliver Kowalke
f9c5075e10 update docu 2015-12-12 23:32:28 +01:00
Oliver Kowalke
ab2d0ae52e documentation updated 2015-12-04 18:26:49 +01:00
Oliver Kowalke
abe114ad81 segmented-stacks=on -> only segmented_stack is available 2015-10-18 19:21:45 +02:00
Oliver Kowalke
d66575e2e6 fiber_manager renamed to scheduler 2015-09-07 17:35:37 +02:00
Oliver Kowalke
6499bb07e7 fiber_context renamed to context 2015-09-07 17:23:59 +02:00
Oliver Kowalke
26ea3aa41c fix performace footnote issue 2015-09-05 15:29:42 +02:00
Oliver Kowalke
c4cfef7148 fix documentation issue related to footnote in table 2015-09-05 15:24:30 +02:00
Oliver Kowalke
2dbdd73e6e fix performance tests for std::thread 2015-09-05 15:21:43 +02:00
Oliver Kowalke
f8c97ffa16 initialize duration with zero 2015-09-05 13:49:29 +02:00