500
Internal server error
Forgejo version: 8.0.2+gitea-1.22.0
diff --git a/src/vault/gear/activity.hpp b/src/vault/gear/activity.hpp index d62e72aa8..61f8acef2 100644 --- a/src/vault/gear/activity.hpp +++ b/src/vault/gear/activity.hpp @@ -101,6 +101,7 @@ namespace gear { // standard copy operations acceptable explicit operator uint32_t() const { return id_;} + explicit operator bool() const { return id_ != 0; } friend bool operator== (ManifestationID const& a, ManifestationID const& b) { return a.id_ == b.id_; } friend bool operator!= (ManifestationID const& a, ManifestationID const& b) { return not (a == b); } diff --git a/src/vault/gear/block-flow.hpp b/src/vault/gear/block-flow.hpp index 4dccb173a..1fc327daa 100644 --- a/src/vault/gear/block-flow.hpp +++ b/src/vault/gear/block-flow.hpp @@ -484,7 +484,7 @@ namespace gear { auto requiredNew = distance / _raw(epochStep_); if (distance % _raw(epochStep_) > 0) ++requiredNew; // fractional: requested deadline lies within last epoch - alloc_.openNew(requiredNew); // Note: epochHandle now points to the first new Epoch + alloc_.openNew(requiredNew); // Note: nextEpoch now points to the first new Epoch for ( ; 0 < requiredNew; --requiredNew) { REQUIRE (nextEpoch); diff --git a/src/vault/gear/scheduler-invocation.hpp b/src/vault/gear/scheduler-invocation.hpp index c57f87335..5b49c1589 100644 --- a/src/vault/gear/scheduler-invocation.hpp +++ b/src/vault/gear/scheduler-invocation.hpp @@ -249,7 +249,8 @@ namespace gear { void activate (ManifestationID manID) { - allowed_.insert (manID); + if (manID) + allowed_.insert (manID); } void diff --git a/src/vault/gear/scheduler.hpp b/src/vault/gear/scheduler.hpp index e605f91fb..36d102479 100644 --- a/src/vault/gear/scheduler.hpp +++ b/src/vault/gear/scheduler.hpp @@ -283,12 +283,51 @@ namespace gear { /** - * + * Set the Scheduler to work on a new CalcStream. + * @param planningJob a »meta-Job« to schedule a chunk of render-Jobs. + * @param manID (optional) a manifestation-ID to be enabled for processing + * @note the planningJob will be dispatched _immediately now,_ which typically + * will cause its dispatch in the current thread (but that is not guaranteed). + * The _deadline_ is also set automatically to a very large leeway (1/10 sec), + * and the new planning job is marked as _compulsory_ — implying that the + * Scheduler will [trigger emergency](\ref #triggerEmergency) if this deadline + * can not be met. Emergency will cause all PlayProcess to be paused. + * @remark it is up to the planning instance to use this mechanism properly; the idea + * is to [place follow-up jobs](\ref #continueMetaJob) repeatedly, always to + * define the next chunk of work jobs. If a ManifestationID is given, then + * obviously the work jobs must use the same ID, since jobs with an ID not + * [explicitly enabled](\ref SchedulerInvocation::activate) will be silently + * discarded (unless the ID is zero, which is always implicitly enabled). + * Moreover, the recommendation is to start planning with at least 20ms + * of remaining headroom, to ensure smooth allocation of capacity. */ void - seedCalcStream() + seedCalcStream (Job planningJob + ,ManifestationID manID = ManifestationID()) { - UNIMPLEMENTED("get it going"); + layer1_.activate(manID); + continueMetaJob (RealClock::now(), planningJob, manID); + } + + + /** + * Place a follow-up job-planning job into the timeline. + */ + void + continueMetaJob (Time nextStart + ,Job planningJob + ,ManifestationID manI
Internal server error
Forgejo version: 8.0.2+gitea-1.22.0