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

752 Commits

Author SHA1 Message Date
Oliver Kowalke
225a052bdc Merge pull request #48 from nat-goodspeed/customization
Flesh out Customization section with step-by-step directions.
2015-08-17 08:04:35 +02: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
95cc663e43 Correctly describe bounded_channel's behavior with lwm items.
I originally assumed that a blocked bounded_channel::push() would only unblock
once the number of items in the channel dropped _below_ lwm, and described it
that way. But in fact the push unblocks as soon as the number of items in the
channel drops as low as lwm. Update documentation accordingly.
2015-08-15 11:20:19 -04:00
Nat Goodspeed
b51d78877c Test that bounded_channel(n, n) throws an exception.
Given the documented behavior of bounded_channel(hwm, lwm), it follows that
bounded_channel(n, n) is invalid.

If the number of items in the channel == hwm, a push will block.

But if the number of items in the channel <= lwm, a push will succeed without
blocking.

Therefore, setting hwm == lwm results in a contradiction.
2015-08-15 11:12:34 -04:00
Nat Goodspeed
b56ef13693 Merge branch 'develop' of http://github.com/olk/boost-fiber into develop 2015-08-15 10:49:21 -04:00
Nat Goodspeed
3e95946350 Add tests for bounded_channel::lower_bound().
We intend to document that bounded_channel(hwm) is equivalent to
bounded_channel(hwm, (hwm-1)). That may or may not simplify the code, but it
certainly simplifies the reader's mental model of the relationship between the
two constructors.

However, that assertion requires that for bounded_channel(hwm), lower_bound()
in fact return (hwm-1). Test for that.

Also use BOOST_CHECK_EQUAL(a, b) instead of BOOST_CHECK(a == b) where
applicable, since the former is more informative when the test fails.

Sadly, tests on channel_op_status must still use BOOST_CHECK(a == b) --
apparently because channel_op_status, as an enum class, cannot be streamed to
std::ostream?
2015-08-15 10:48:58 -04:00
Oliver Kowalke
514e618924 Merge pull request #46 from nat-goodspeed/develop
Eliminate opaque fiber_properties::back_ptr typedef.
2015-08-14 22:43:35 +02:00
Nat Goodspeed
28cbce1256 Eliminate opaque fiber_properties::back_ptr typedef.
It's more straightforward to use the underlying type: fiber_context*.
2015-08-14 16:10:42 -04:00
Oliver Kowalke
34ea3ef9bd Merge pull request #45 from nat-goodspeed/develop
Review rationale.qbk
2015-08-14 17:30:08 +02:00
Nat Goodspeed
7a7e10295d Track renamed rationale.qbk. Move it just after overview.qbk. 2015-08-14 11:22:13 -04:00
Nat Goodspeed
666ada61ec Review rationale.qbk. 2015-08-14 11:21:42 -04:00
Nat Goodspeed
e08611555b Rename rational.qbk to rationale.qbk. 2015-08-14 11:10:44 -04:00
Oliver Kowalke
94fab2bb78 Merge pull request #44 from nat-goodspeed/develop
Review documentation for packaged_task, fls and performance.
2015-08-14 08:02:03 +02:00
Nat Goodspeed
7c7bb2a6d1 Consolidate performance tables.
Make separate columns for Fiber with default synchronization and Fiber
compiled with BOOST_FIBERS_NO_ATOMICS.

Attempt to link tables to corresponding source files. Attempt does not yet
appear successful.
2015-08-13 17:40:42 -04:00
Nat Goodspeed
d1df99fab1 A couple small edits to fls.qbk. 2015-08-13 15:23:40 -04:00
Nat Goodspeed
90ea0e30c4 Update packaged_task documentation.
Describe conventional usage of packaged_task.

Remove documentation for removed members operator safe_bool() and operator!().
2015-08-13 15:17:53 -04:00
Oliver Kowalke
67bda8c788 Merge pull request #43 from nat-goodspeed/develop
Proofread new discussion of fiber migration in Rationale.
2015-08-13 13:50:46 +02:00
Nat Goodspeed
4d36df2085 Proofread new discussion of fiber migration in Rationale. 2015-08-13 07:38:30 -04:00
Oliver Kowalke
5112f9b4b5 documentation: add notice why fiber migration is not supported
- interaction of TLS and coroutines/fibers
- NUMA architecutes and memory latency
2015-08-13 09:47:52 +02:00
Oliver Kowalke
c1df97024e Merge pull request #42 from nat-goodspeed/develop
More documentation work
2015-08-13 08:01:22 +02:00
Nat Goodspeed
a249f98f14 Reconcile promise.qbk with current implementation.
Add a cross-reference to shared state.

Remove doc for operator safe_bool() and operator!().

Clarify that set_exception() accepts specifically std::exception_ptr.
2015-08-12 20:35:05 -04:00
Nat Goodspeed
bd8e43ffa7 Merge branch 'develop' of github.com:olk/boost-fiber into develop 2015-08-12 16:35:08 -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
2fcf006f90 fix docu 2015-08-12 19:40:09 +02:00
Oliver Kowalke
a6f2770cab Revert "fix usage of result_of"
This reverts commit 59b99f3e69.
2015-08-12 18:14:43 +02:00
Oliver Kowalke
59b99f3e69 fix usage of result_of 2015-08-12 17:47:43 +02:00
Nat Goodspeed
3d945b76bd Proofread today's documentation updates. 2015-08-08 11:03:47 -04:00
Oliver Kowalke
963af66c02 fix using packagged_task<> in asnyc() 2015-08-06 19:04:43 +02:00
Oliver Kowalke
3d93a5f98f fix missing line 2015-08-06 17:30:34 +02:00
Oliver Kowalke
99313c93da remove TODO comments 2015-08-06 17:22:14 +02:00
Oliver Kowalke
dc8af4ea7a documentation: remove refrence to boost.chrono ad boost.move 2015-08-06 17:21:29 +02:00
Oliver Kowalke
7c25c83465 (un)bounded_channel: remove is_empty()/is_closed()/is_full() 2015-08-05 19:59:47 +02:00
Oliver Kowalke
236494717f documentation: add comment regarding to migration of fibers 2015-08-05 19:59:22 +02:00
Oliver Kowalke
d8e9559848 Merge pull request #41 from nat-goodspeed/develop
test_try_push() fix and channel::is_closed() wording
2015-08-05 14:07:25 +02:00
Nat Goodspeed
b6f4fc8d42 test_try_push() should call try_push(). 2015-08-05 07:51:49 -04:00
Nat Goodspeed
1897a2a9fc Explain that is_closed() doesn't imply is_empty(). 2015-08-05 07:51:10 -04:00
Oliver Kowalke
4cdb326754 documentation: link to supported architectures 2015-08-04 20:00:07 +02:00
Oliver Kowalke
ac691acce9 documentation: tested compilers 2015-08-04 19:54:57 +02:00
Oliver Kowalke
3b6f736a39 fixes for (un)bounded_channel 2015-08-04 19:30:31 +02:00
Oliver Kowalke
dbfde81013 enhance unit-test for bounded_channel 2015-08-04 17:19:26 +02:00
Oliver Kowalke
95d6a589a7 fix performance test code for fibers
- preserve_fpu() was removed
2015-08-03 21:11:16 +02:00
Oliver Kowalke
b91fc419cf fix waiting_queue impl 2015-08-03 20:19:51 +02:00
Oliver Kowalke
ba80101f47 enhance test for bounded_channel
- note implementation of waiting_queue does not preserve order
  therefore unit test for bounded_channel fails
2015-08-03 17:33:04 +02:00
Oliver Kowalke
368e4e5063 Merge pull request #40 from nat-goodspeed/develop
Add ready_fibers() override for examples/priority.cpp.
2015-08-03 08:34:36 +02:00
Oliver Kowalke
f456902492 add test for bounded_channel (basics) 2015-08-02 21:17:04 +02:00
Oliver Kowalke
3538208387 test_unbounded_channel: add test for moveable type 2015-08-02 21:16:40 +02:00
Oliver Kowalke
f275125b93 fixes for unbounded_channel 2015-08-02 20:48:52 +02:00
Nat Goodspeed
0d5ad2adbd Add ready_fibers() override for examples/priority.cpp. 2015-07-31 17:29:33 -04:00
Oliver Kowalke
6a0b14e3e8 some mods for asnyc(some mods for asnyc()) 2015-07-31 14:49:48 +02:00
Oliver Kowalke
81babd03be tests: enable tests for shared_future<> 2015-07-31 12:12:36 +02:00