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

80 Commits

Author SHA1 Message Date
Oliver Kowalke
778656934f captured_context renamed to execution_context (v2)
- execution_context (v2) is enabled per default
- execution_context (v1) is used for segmented stacks
2016-02-06 13:34:10 +01:00
Oliver Kowalke
12555f9561 execution_context required for segmented stacks 2016-02-06 10:21:54 +01:00
Oliver Kowalke
7e183329ee use captured_context aonly 2016-02-05 18:14:38 +01:00
Oliver Kowalke
12554320ae enable pre-condition in scheduler::attack_worker_context() 2015-12-27 23:22:38 +01:00
Oliver Kowalke
570b0a9ea9 rename condition -> condition_variable 2015-12-13 13:46:26 +01:00
Oliver Kowalke
e9a0d4d669 remove noexcept from dtor of context+scheduler 2015-12-05 15:14:31 +01:00
Oliver Kowalke
3319841788 use spinlock_lock+context instead of function<> 2015-12-03 17:57:00 +01:00
Oliver Kowalke
9063b8dc5b some C++14 polishing 2015-12-02 17:19:51 +01:00
Oliver Kowalke
726d4d51b9 ++14 polishing 2015-12-01 21:07:11 +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
26227e31b2 refactor scheduler::dispatch() 2015-11-25 19:25:48 +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
cfc4b6f292 protect worker_queue by spinlock 2015-10-21 15:26:06 +02:00
Oliver Kowalke
4e6b625f65 assert if source and traget context are euqal in resume_() 2015-10-20 17:52:01 +02:00
Oliver Kowalke
4710e12fe1 rename scheduler::re_schedule() -> scheduler::suspend() 2015-10-18 20:03:38 +02:00
Oliver Kowalke
5f5a607d87 request unwinding and resume fibers at end of dispatch() 2015-10-18 09:08:15 +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
338f9754ee move yielded context' after resume-op 2015-10-15 12:21:54 +02:00
Oliver Kowalke
65f33ae615 remove unnecessary checks 2015-10-14 15:54:08 +02:00
Oliver Kowalke
51c1a96c4d introduce attach/detach of context 2015-10-14 13:37:44 +02:00
Oliver Kowalke
7d18820962 erase terminated context from worker-queue 2015-10-12 22:03:20 +02:00
Oliver Kowalke
22b96fc826 assertion: main- and dispatcher cotnext must not be unwinded 2015-10-11 12:04:20 +02:00
Oliver Kowalke
b859f8984a add assertion in get_next_() ensures scheduler is set 2015-10-11 08:44:06 +02:00
Oliver Kowalke
950a1571bb do not move yielded contexts in resume_() 2015-10-11 08:43:40 +02:00
Oliver Kowalke
01dda0048f remove std::mutex associated with yield-queue 2015-10-11 08:42:48 +02:00
Oliver Kowalke
dbfd80fb2d use yield-queue because work-sharing
- yield-queue prevents resumtion of a fiber which is passed to
  awakened() but has not yet suspended
2015-10-10 21:52:03 +02:00
Oliver Kowalke
5357f7038e scheduling-algorithm handles empty ready-queue
- if dispatcher-context detects empty ready-queue
  the scheduler has to be suspended till signaled or
  timeout reached
2015-10-03 09:35:47 +02:00
Oliver Kowalke
20196fcd69 set active context to nullptr in ~scheduler() 2015-09-30 19:58:04 +02:00
Oliver Kowalke
05bd4b9424 move context' from current scheduler to new, custom scheduler 2015-09-30 17:37:11 +02:00
Oliver Kowalke
5ee6570363 check for unwinding on correct conntext after resume 2015-09-29 20:10:10 +02:00
Oliver Kowalke
4c791a3790 support for fiber properties + custom scheduler 2015-09-29 17:54:29 +02:00
Oliver Kowalke
a847baa932 link/unlink of context protected by spinlock 2015-09-28 19:58:22 +02:00
Oliver Kowalke
eb7c4249d5 rename managed_is_linked() -> worker_is_linked() 2015-09-28 19:35:59 +02:00
Oliver Kowalke
fc404c58eb unwind at shutdown
- scheduler holds a list of managed worker-fibers
- ~scheduler() requests stack unwinding for fibers not yet terminated
2015-09-24 17:35:40 +02:00
Oliver Kowalke
7668f86c26 more comments in scheduler.cpp 2015-09-23 17:44:50 +02:00
Oliver Kowalke
d3076f930b some enhancements for scheduler 2015-09-23 17:44:35 +02:00
Oliver Kowalke
e38dc9b139 renaming of scheduler member functions 2015-09-22 19:30:29 +02:00
Oliver Kowalke
1ad58fbba1 add interruption 2015-09-21 20:18:53 +02:00
Oliver Kowalke
eec3d34fb0 remote ready-queue uses differrent hook than local ready-queue 2015-09-20 22:06:59 +02:00
Oliver Kowalke
22a1f1257d some source code formating 2015-09-20 15:38:43 +02:00
Oliver Kowalke
558012bdcf rewording of comments in scheduler implementation 2015-09-20 11:28:11 +02:00
Oliver Kowalke
6b01f060b7 class timed_mutex added 2015-09-19 18:03:41 +02:00
Oliver Kowalke
943e21e69b add support for signaling a context as ready 2015-09-19 16:19:02 +02:00
Oliver Kowalke
59946d4426 add noexcept keyword to scheduler::wait_until() and context::wait_until() 2015-09-19 16:18:36 +02:00
Oliver Kowalke
6da902ff09 support sleep_for()/sleep_until() 2015-09-19 08:59:53 +02:00
Oliver Kowalke
8a9c9916c7 support this_fiber::yield() 2015-09-18 17:48:57 +02:00
Oliver Kowalke
7a794647ae replace context::terminated_is_linked() by context::is_terminated()
- context::terminated_is_linked() might be missleading because this
  state is transient
- if the context is pushed to the terminated-queue,
  context::terminated_is_linked() returns true, if the context is
  removed from terminated-queue context::terminated_is_linked() returns
  false
- new flag flag_terminated intoduced
- flag_terminated will be set in context::set_terminated_(), which will
  be called for worker context' in the lambda
2015-09-16 22:17:01 +02:00
Oliver Kowalke
70f4d9eeff rename variable active-context scheduler 2015-09-16 22:10:23 +02:00