Commit Graph

1840 Commits

Author SHA1 Message Date
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
4a3442e045 apply thread_local keyword to global yield (asio) 2016-03-07 18:47:44 +01: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
6c15fe0a5c foramting code 2016-03-04 18:24:25 +01:00
Oliver Kowalke
5526765c10 skynet test uses pooled_fixedsize_stack 2016-03-04 18:24:01 +01:00
Oliver Kowalke
0a3a2af486 import pooled_fixedsize_stack 2016-03-04 18:23:40 +01:00
Oliver Kowalke
0063c71ad8 remove example skynet_mt 2016-03-03 06:24:51 +01:00
oliver Kowalke
ffffd322bb imake asio example thread-safe 2016-03-01 08:56:15 +01:00
Oliver Kowalke
fc73bdfc52 merge examples echo_client+echo_server into one application 2016-02-29 19:00:42 +01:00
Oliver Kowalke
d1430e395b change asio/echo example 2016-02-28 20:24:12 +01:00
Oliver Kowalke
3572b00e59 update docu regarding to performance 2016-02-28 15:56:54 +01:00
Oliver Kowalke
d1cabf3cb3 small fix for skynet test 2016-02-28 13:03:10 +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
65601ed620 addy skynet microbenchmark 2016-02-27 20:09:55 +01:00
Oliver Kowalke
1be0789aec use fast_pool_allocator for channels 2016-02-27 20:07:55 +01:00
Oliver Kowalke
a48c0eb491 fix include of headers 2016-02-27 20:07:06 +01:00
Oliver Kowalke
6f0caee2e7 docu: make isntalltion section an appendix 2016-02-18 19:23:55 +01:00
Oliver Kowalke
6fb1c627ac fix adatp_callbacks.cpp 2016-02-17 19:48:25 +01:00
Oliver Kowalke
f48cbd6f2f adatp-callbacks: C++11 does not support generalized lambda captures 2016-02-17 17:17:55 +01:00
Oliver Kowalke
b56d95b8fc fix example adapt_callbacks
C++11 does not support generalized lambda captures
2016-02-16 11:06:32 +01:00
Oliver Kowalke
43eb5bd769 fix example priority.cpp 2016-02-16 11:05:21 +01:00
Oliver Kowalke
2509553074 move returned reference in future<R>::get() 2016-02-16 09:42:06 +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
Oliver Kowalke
8e801986b3 Merge pull request #74 from nat-goodspeed/develop
Almost completed latest pass through documentation.
2016-02-16 08:05:03 +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
78e30d8416 Streamline implementation of priority.cpp's priority_scheduler.
Now that rqueue_ is an STL-compatible container,
priority_scheduler::awakened() can use std::find_if() to search for a context
with a lower priority.

Now that rqueue_ is an intrusive_list, priority_scheduler::property_change()
need not search it: it can simply test with context::ready_is_linked(). Now
that it's a doubly-linked list, we can use context::ready_unlink() to unlink.

Now that method parameters have been renamed from 'f' to 'ctx', change all
references in comments accordingly.
2016-02-15 20:27:44 -05:00
Nat Goodspeed
8376fda3ba Merge branch 'develop' of github.com:olk/boost-fiber into develop 2016-02-15 19:34:04 -05:00
Nat Goodspeed
ea0c16080b A few more documentation-related edits 2016-02-15 17:12:56 -05:00
Oliver Kowalke
e43cf5b1ac enum for context types 2016-02-15 19:49:22 +01:00
Oliver Kowalke
3522245899 link unit-tests against boost.thread 2016-02-13 11:25:02 +01:00
Nat Goodspeed
eb0d01bd28 Merge branch 'develop' of github.com:olk/boost-fiber into develop 2016-02-12 10:23:57 -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
Oliver Kowalke
547e19a811 adapt to template execution_context (v2) 2016-02-09 17:15:36 +01: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