diff --git a/src/vault/gear/scheduler-commutator.hpp b/src/vault/gear/scheduler-commutator.hpp
index 8f5046c66..e36c6bae4 100644
--- a/src/vault/gear/scheduler-commutator.hpp
+++ b/src/vault/gear/scheduler-commutator.hpp
@@ -218,7 +218,13 @@ namespace gear {
activity::Proc
postDispatch (Activity* chain, Time when
,EXE& executionCtx
- ,SchedulerInvocation& layer1)
+ ,SchedulerInvocation& layer1
+ //////////////////////////////////////////////////////////////////////////////////////////////OOO API / Design problem with "context" and significance-Params
+ , Time dead =Time::NEVER //////////////////////////////////TODO booom!!
+ , ManifestationID manID =ManifestationID()
+ , bool compulsory = false
+ //////////////////////////////////////////////////////////////////////////////////////////////OOO API / Design problem with "context" and significance-Params
+ )
{
if (!chain) return activity::SKIP;
@@ -227,9 +233,9 @@ namespace gear {
return ActivityLang::dispatchChain (chain, executionCtx);
else
if (holdsGroomingToken (thisThread()))
- layer1.feedPrioritisation (*chain, when);
+ layer1.feedPrioritisation (*chain, when, dead, manID, compulsory);
else
- layer1.instruct (*chain, when);
+ layer1.instruct (*chain, when, dead, manID, compulsory);
return activity::PASS;
}
};
diff --git a/src/vault/gear/scheduler.hpp b/src/vault/gear/scheduler.hpp
index fdd93ca78..6b3901eca 100644
--- a/src/vault/gear/scheduler.hpp
+++ b/src/vault/gear/scheduler.hpp
@@ -254,6 +254,12 @@ namespace gear {
UNIMPLEMENTED("wrap the ActivityTerm");
}
+ //////////////////////////////////////////////////////////////////////////////////////////////OOO the role of this function remains unclear; currently used from »Tick«
+ activity::Proc postChain (Activity*, Time start
+ , Time dead =Time::ANYTIME
+ , ManifestationID manID =ManifestationID()
+ , bool isCompulsory = false);
+
/**
* The worker-Functor: called by the active Workers from the
@@ -500,6 +506,18 @@ namespace gear {
}
+ //////////////////////////////////////////////////////////////////////////////////////////////OOO the role of this function remains unclear; currently used from »Tick«
+ inline activity::Proc
+ Scheduler::postChain (Activity* chain, Time start, Time dead
+ ,ManifestationID manID, bool isCompulsory)
+ {
+ auto& ctx = ExecutionCtx::from (*this);
+ return layer2_.postDispatch (chain, start, ctx, layer1_
+ //////////////////////////////////////////////////////////////////////////////////////////////OOO API / Design problem with "context" and significance-Params
+ ,dead,manID,isCompulsory);
+ }
+
+
/**
* »Tick-hook« : code to maintain sane running status.
* This function will be invoked [regularly](\ref DUTY_CYCLE_PERIOD) while the scheduler
@@ -517,7 +535,10 @@ namespace gear {
{
// consolidate queue content
layer1_.feedPrioritisation();
- //////////////////////////////////////////////////////////////////////OOO clean-up of outdated tasks here
+ // clean-up of outdated tasks here
+ while (layer1_.isOutdated (now) and not layer1_.isOutOfTime(now))
+ layer1_.pullHead();
+ // protect against missing the deadline of a compulsory task
if (layer1_.isOutOfTime (now))
{
triggerEmergency();
@@ -533,9 +554,8 @@ namespace gear {
{// prepare next duty cycle »tick«
Time nextTick = now + DUTY_CYCLE_PERIOD;
Time deadline = nextTick + DUTY_CYCLE_TOLERANCE;
- auto& ctx = ExecutionCtx::from (*this);
Activity& tickActivity = activityLang_.createTick (deadline);
- ctx.post(nextTick, &tickActivity, ctx);
+ postChain (&tickActivity, nextTick, deadline, ManifestationID(), true);
}
}
diff --git a/tests/vault/gear/scheduler-invocation-test.cpp b/tests/vault/gear/scheduler-invocation-test.cpp
index 55dd05483..8dfbec9c7 100644
--- a/tests/vault/gear/scheduler-invocation-test.cpp
+++ b/tests/vault/gear/scheduler-invocation-test.cpp
@@ -28,7 +28,6 @@
#include "lib/test/run.hpp"
#include "vault/gear/scheduler-invocation.hpp"
#include "lib/util.hpp"
-#include "lib/test/diagnostic-output.hpp"///////////////////TODO
using test::Test;
using util::isSameObject;
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index 3bd271f75..b442927be 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -80655,8 +80655,9 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
+
+
@@ -83846,18 +83847,18 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -83907,6 +83908,9 @@ Date: Thu Apr 20 18:53:17 2023 +0200
+
+
+
@@ -84052,9 +84056,12 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
+
+
+
+
+
@@ -84090,8 +84097,8 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
+
+
@@ -84220,27 +84227,26 @@ Date: Thu Apr 20 18:53:17 2023 +0200
brauche generische Informationsfunktion isOutdated()