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

294 Commits

Author SHA1 Message Date
Oliver Kowalke
13bf486fea update stack-allocators 2015-02-06 18:29:26 +01:00
Oliver Kowalke
f37d7c5511 store terminated fibers in tqueue 2015-01-15 21:22:10 +01:00
Oliver Kowalke
f22ae8ba53 use lambda as fiber-fn 2015-01-13 15:15:59 +01:00
Oliver Kowalke
27c0a78d36 allocate fiber_context on stack 2015-01-13 14:57:32 +01:00
Oliver Kowalke
fbe98be71e std::copy_exception is deprecated (use std::make_exception_ptr) 2015-01-05 19:57:51 +01:00
Oliver Kowalke
654127af00 rename fiber_base -> fiber_context and move to public namespace 2015-01-04 16:05:08 +01:00
Oliver Kowalke
3b332c17ee variadric arguments 2015-01-01 14:40:39 +01:00
Oliver Kowalke
584dcdceee allocate/deallocate fiber_base via allocator 2014-12-29 17:38:01 +01:00
Oliver Kowalke
6a652b8cd7 use std::forward() for rvalues 2014-12-28 22:03:09 +01:00
Oliver Kowalke
f6c7ab7826 rename (un)bounded_queue -> (un)bounded_channel + use allocator 2014-12-28 21:30:14 +01:00
Oliver Kowalke
44326ebdd3 remove priority 2014-12-28 08:35:44 +01:00
Oliver Kowalke
4d1f12e333 extend async() to accept a stack-allocator 2014-12-28 08:07:31 +01:00
Oliver Kowalke
0bd0062789 correct forward declaration of scheduler 2014-12-27 21:16:58 +01:00
Oliver Kowalke
e1698b64a3 static-cast to int for errc 2014-12-27 21:16:36 +01:00
Oliver Kowalke
7f7f01098b make main-fiber thread affine 2014-12-27 21:16:03 +01:00
Oliver Kowalke
2f19be6d67 use C++11 2014-12-27 19:07:42 +01:00
Oliver Kowalke
ddbdd91ced use execution_context 2014-11-24 19:58:59 +01:00
Oliver Kowalke
9bd1c0cd0f Nat Goodspeed: optimize fifo + waiting_queue 2014-11-24 19:18:18 +01:00
Oliver Kowalke
81ec70bcef optimize queues : from Nat Goodspeed 2014-11-24 18:11:37 +01:00
Oliver Kowalke
e29cc6dc81 use correct eader for thread_specific_ptr<> 2014-11-24 18:11:22 +01:00
Oliver Kowalke
6fc2b57f23 use thread_specific_ptr 2014-11-24 18:11:08 +01:00
Oliver Kowalke
2e4fa3e53f re-factoring of thread_local_ptr<> 2014-10-01 21:40:12 +02:00
Oliver Kowalke
1c3b447716 some fixes 2014-09-26 17:57:53 +02:00
Oliver Kowalke
7483a729aa some fixes 2014-09-25 18:52:04 +02:00
Oliver Kowalke
fca6e0301a call cleanup-function in thread_local_ptr 2014-09-25 18:51:30 +02:00
Oliver Kowalke
7fb469cd10 some fixes 2014-09-24 19:18:44 +02:00
Oliver Kowalke
5910ac9eff remove 'break' from qaiting_queue
- break prevents asio exmples from working
2014-09-18 20:37:55 +02:00
Vincent Lee
c6cdd4a988 fix deque erase, the end() iterator cannot be used as erase position. 2014-09-15 18:04:36 +08:00
Oliver Kowalke
e48252837f accept any clock type for lock_until() etc. 2014-09-05 17:55:16 +02:00
Oliver Kowalke
2d4a919faa fix errors because of -pedantic 2014-08-23 14:20:01 +02:00
Oliver Kowalke
0aaff7cb6d fix queues::push(9 for MSVC 2014-08-23 13:40:42 +02:00
Oliver Kowalke
6c1229af0d call forward() and move() with namespace boost 2014-08-21 20:22:10 +02:00
Oliver Kowalke
64ea436557 inline functions for full-specialized tempaltes 2014-08-21 17:34:23 +02:00
Oliver Kowalke
00944ddf6a update using chrono-clocks 2014-08-20 17:37:47 +02:00
olk
539660d132 Merge pull request #19 from niXman/develop
preprocessor inline macro replaced
2014-08-17 22:04:54 +02:00
niXman
13bbaf0ced preprocessor inline macro replaced 2014-08-17 22:56:42 +03:00
Oliver Kowalke
5ede204812 optimize calling high_resolution_clock::now() 2014-08-17 20:28:40 +02:00
Oliver Kowalke
f615b5f6fc fix bind() using variadric args 2014-07-29 18:13:39 +02:00
Oliver Kowalke
20e6bb78ca optimize trampoline() - store fiber-fn only once 2014-07-29 18:13:05 +02:00
Oliver Kowalke
19c66aa610 sech_algorithm in separat file 2014-07-21 20:04:24 +02:00
Oliver Kowalke
4a2162f83b fixes for unbounded_queue<> 2014-07-20 11:10:48 +02:00
Oliver Kowalke
e077960c14 fixes for bounded_queue<> 2014-07-20 11:10:32 +02:00
Nat Goodspeed
59fd8ed319 Expressions with side effects in BOOST_ASSERT() fail in release builds. :-P
Also suppress a few 'unused variable' warnings.
2014-07-18 11:05:30 -04:00
Nat Goodspeed
9e21b43221 Move new node_type allocations before locking mtx_. 2014-07-18 08:29:10 -04:00
Nat Goodspeed
d7035722b4 Pass unique_lock down to push_() and push_wait_until_().
Earlier refactoring moved the unique_lock instantiation back to public
methods, though it was referenced in private methods. Pass it into those
methods.
2014-07-17 16:53:20 -04:00
Nat Goodspeed
b01cc1f224 Reintroduce pthread_key_create() implementation for Mac thread_local_ptr.
At some point the original implementation seems to have gotten lost?
2014-07-17 15:02:04 -04:00
Nat Goodspeed
9e81e970d9 Move lock acquisition from private back to public methods.
Oliver pointed out the thread-safe-interface pattern:
http://www.cs.wustl.edu/~schmidt/PDF/locking-patterns.pdf
2014-07-17 09:40:20 -04:00
Nat Goodspeed
0bde483bd2 Refactor bounded_queue<T> implementation to reduce redundancy.
Introduce private push_(), try_push_(), push_wait_until_() helper methods:
each of push(), try_push() and push_wait_until() has two signatures for
value_type const& versus value_type&&, but the code paths are identical once
we have a new node_type in hand. Moreover, extract processing common to all
into private push_and_notify_() method. (This fixes an inconsistency in push()
exception behavior.)

Extract common processing from pop(), value_pop(), try_pop() and
pop_wait_until() to private value_pop_() method. This retains a node_type::ptr
to the old head node until return time, unifying the code paths between its
return-by-value and assign-through-reference callers. (This fixes an
inconsistency in try_pop() exception behavior.)
2014-07-16 12:06:37 -04:00
Oliver Kowalke
2b421d41f8 fix for MSVC 2014-07-15 22:28:41 +02:00
Oliver Kowalke
22850775ca variadric tempalte args 2014-07-15 20:33:14 +02:00