Oliver Kowalke
2e6e215eba
use std::move() in move-ctor/assignment operator
2015-12-10 17:20:51 +01:00
Oliver Kowalke
5b2effab58
relax to C++11
2015-12-09 19:21:25 +01:00
Oliver Kowalke
73b5d9fffc
Update shared_state.hpp
2015-12-08 08:43:15 +01:00
Oliver Kowalke
622403426f
remove decay_t<> from task_object typedef
2015-12-07 19:20:46 +01:00
Oliver Kowalke
a49cf433f7
some code formating
2015-12-07 18:47:35 +01:00
Oliver Kowalke
228a676875
fix implementation of packaged_task::reset()
2015-12-07 18:47:11 +01:00
Oliver Kowalke
398cb6fd48
fix typedef of task_object in packaged_task
2015-12-07 18:45:36 +01:00
Oliver Kowalke
f23cad16af
make ctor of packged_task explicit
2015-12-07 18:44:41 +01:00
Oliver Kowalke
45599678e6
fix usage of aligned_storage in shared_state_base
2015-12-07 18:43:34 +01:00
Oliver Kowalke
05d447b011
use global new-op for context control-struct
2015-12-07 18:42:01 +01:00
Oliver Kowalke
df2468765b
qualify ctors with noexcept
2015-12-07 18:41:36 +01:00
Oliver Kowalke
2838e2d8e2
do_invoke() renamed to apply()
2015-12-06 21:53:24 +01:00
Oliver Kowalke
2d0dbb4fa1
use allocator_traits
2015-12-06 21:52:43 +01:00
Oliver Kowalke
117a55d8c6
replace user-defined future_status+ future_errc by those of std
2015-12-05 20:16:07 +01:00
Oliver Kowalke
2623916242
define fiber::future_status in terms of std::future_status
2015-12-05 20:05:55 +01:00
Oliver Kowalke
9e28e386aa
re-factor promise
2015-12-05 18:17:19 +01:00
Oliver Kowalke
8098834d71
use of using directive for future::wait_for()/future::wait_until()
2015-12-05 15:54:55 +01:00
Oliver Kowalke
c8071c5373
fix data_t for MSVC 14 (initializer-list issue)
2015-12-04 18:26:49 +01:00
Oliver Kowalke
3319841788
use spinlock_lock+context instead of function<>
2015-12-03 17:57:00 +01:00
Oliver Kowalke
abbc507d13
re-factor futures
2015-12-02 21:57:27 +01:00
Oliver Kowalke
9063b8dc5b
some C++14 polishing
2015-12-02 17:19:51 +01:00
Oliver Kowalke
0519929d26
C++14 - context
2015-12-02 17:18:31 +01:00
Oliver Kowalke
f225548427
C++14 - barrier
2015-12-02 17:18:07 +01:00
Oliver Kowalke
4157d2dc5d
fix unbounded_channel
2015-12-02 17:17:43 +01:00
Oliver Kowalke
726d4d51b9
++14 polishing
2015-12-01 21:07:11 +01:00
Oliver Kowalke
8751e7e642
C++14 (un)boudned_channel
2015-11-30 22:06:24 +01:00
Oliver Kowalke
204a3ebc47
C++14 - fss_cleanup_function
2015-11-30 20:23:50 +01:00
Oliver Kowalke
df45a33f70
C++14 - spinlock
2015-11-30 20:23:29 +01:00
Oliver Kowalke
03e39b0400
c++14 - autoreset_event
2015-11-30 20:22:58 +01:00
Oliver Kowalke
3c8547c161
remove file interupt_flags.hpp
2015-11-30 20:22:32 +01:00
Oliver Kowalke
7bd1863115
apply noexcept
2015-11-25 19:32:32 +01:00
Oliver Kowalke
a344247f07
remove forced_unwind and related functions
...
- unwinding the stack via exception is not always necessary
- usually a fiber returns from its fiber-fn (stack is already unwound)
- if a fiber has to terminate, interrupt that fiber
2015-11-25 19:30:25 +01:00
Oliver Kowalke
6112d85a1a
test for max. time_point before apply to condition_variable
...
- autoreset_event::reset() might get an time-point with value
of std::chrono::steady_clock::time_point::max()
- this value make the underlying call to pthread_condition_wait() fail
(not reported by std::condition-variable::wait_until())
2015-11-25 19:21:11 +01:00
Oliver Kowalke
6d3f00902f
use this in capture-list
2015-11-22 14:42:28 +01:00
Oliver Kowalke
ca655a84d9
execute func + set active fiber inside context::resume()
2015-11-22 14:28:09 +01:00
Oliver Kowalke
5277c51bbb
re-add previously removed context::attach()
2015-10-21 15:40:50 +02:00
Oliver Kowalke
cfc4b6f292
protect worker_queue by spinlock
2015-10-21 15:26:06 +02:00
Oliver Kowalke
f743b63bc0
replace context::attach()/detach() by context::migrate()
2015-10-21 15:25:12 +02:00
Oliver Kowalke
ee2fc59ca1
call destructor for stored values in shared_state
2015-10-20 10:09:57 +02:00
Oliver Kowalke
11419967cd
condition unlocks external mutex befor context switch
2015-10-18 20:07:24 +02:00
Oliver Kowalke
8ddf96f756
reformating in scheudler.hpp
2015-10-18 20:07:01 +02:00
Oliver Kowalke
4710e12fe1
rename scheduler::re_schedule() -> scheduler::suspend()
2015-10-18 20:03:38 +02:00
Oliver Kowalke
af6ead53ae
static assert for linking context with a queue
2015-10-18 20:00:41 +02:00
Oliver Kowalke
abe114ad81
segmented-stacks=on -> only segmented_stack is available
2015-10-18 19:21:45 +02:00
Oliver Kowalke
b540e80619
cotnext::suspend() with default parameter nullptr
2015-10-18 09:23:15 +02:00
Oliver Kowalke
e63186adfe
use std::addressof() for references in shared_state<R&>
2015-10-17 15:17:31 +02:00
Oliver Kowalke
559e498982
context::terminate() as replacement for set_terminated_()/release()
2015-10-17 15:10:28 +02:00
Oliver Kowalke
bafd65bcf3
remove yield-queue + pass functor to resume-op
2015-10-16 21:48:57 +02:00
Oliver Kowalke
de076200a6
future: support moveable-only types
2015-10-14 21:03:33 +02:00
Oliver Kowalke
79e5776805
qualify functions which use intrusive-list with const and noexcept
2015-10-14 16:05:20 +02:00