diff --git a/src/vault/gear/scheduler-invocation.hpp b/src/vault/gear/scheduler-invocation.hpp index 5b49c1589..dce1de6c8 100644 --- a/src/vault/gear/scheduler-invocation.hpp +++ b/src/vault/gear/scheduler-invocation.hpp @@ -132,6 +132,14 @@ namespace gear { Time startTime() const { return Time{TimeValue{starting}};} Time deathTime() const { return Time{TimeValue{deadline}};} + + void + refineTo (Activity* chain, Time when, Time dead) + { + activity = chain; + starting = _raw(activity->constrainedStart (when.isRegular()? when:startTime())); + deadline = _raw(activity->constrainedDeath (dead.isRegular()? dead:deathTime())); + } }; diff --git a/src/vault/gear/scheduler.hpp b/src/vault/gear/scheduler.hpp index 1beeb2412..16696567f 100644 --- a/src/vault/gear/scheduler.hpp +++ b/src/vault/gear/scheduler.hpp @@ -511,16 +511,16 @@ namespace gear { * of activations and notifications. The concrete implementation * needs some further contextual information, which is passed * down here as a nested sub-context. + * @note different than Scheduler::postChain(), this operation here + * always enqueues the \a chain, never dispatches directly. + * This special twist helps to improve parallelisation. */ activity::Proc post (Time when, Time dead, Activity* chain, ExecutionCtx& ctx) { REQUIRE (chain); ActivationEvent chainEvent = ctx.rootEvent; - chainEvent.activity = chain; - chainEvent.starting = _raw(chain->constrainedStart (when)); - chainEvent.deadline = _raw(chain->constrainedDeath (dead.isRegular()? dead:chainEvent.deathTime())); -// ExecutionCtx subCtx{scheduler_, chainEvent}; + chainEvent.refineTo (chain, when, dead); return scheduler_.layer2_.instructFollowUp (chainEvent, scheduler_.layer1_); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index e5db84ca8..b9d206f23 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -104755,6 +104755,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ @@ -105210,8 +105211,33 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + + + + + + + + + +

+ das ist nicht gut +

+ +
+ + + +

+ ...denn es führt dazu, daß ab der 2. Schleifen-Iteration die Allokation neuer Activities nicht mehr geschützt ist; das könnte den beobachteten Crash erklären +

+ +
+ + +