Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
Scheduler::ExecutionCtx Class Reference

#include "vault/gear/scheduler.hpp"

Description

Remarks
when due, the scheduled Activities are performed within the Activity-Language execution environment; some aspects of Activity activation however require external functionality, which — for the purpose of language definition — was abstracted as Execution-context. The implementation of these binding functions fills in relevant external effects and is in fact supplied by the implementation internals of the scheduler itself.

Definition at line 438 of file scheduler.hpp.

Public Attributes

ActivationEvent rootEvent
 

Public Member Functions

 ExecutionCtx (Scheduler &self, ActivationEvent toDispatch)
 
activity::Proc post (Time when, Time dead, Activity *chain, ExecutionCtx &ctx)
 λ-post: enqueue for time-bound execution, within given ExecutionCtx.
 
void work (Time now, size_t qualifier)
 λ-work : transition Managment-Mode -> Work-Mode
 
void done (Time now, size_t qualifier)
 λ-done : signal end time of actual processing
 
activity::Proc tick (Time now)
 λ-tick : scheduler management duty cycle
 
Time getSchedTime ()
 access high-resolution-clock, rounded to µ-Ticks
 

Private Attributes

Schedulerscheduler_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ ExecutionCtx()

ExecutionCtx ( Scheduler self,
ActivationEvent  toDispatch 
)
inline

Definition at line 446 of file scheduler.hpp.

Member Function Documentation

◆ post()

activity::Proc post ( Time  when,
Time  dead,
Activity chain,
ExecutionCtx ctx 
)
inline

λ-post: enqueue for time-bound execution, within given ExecutionCtx.

Remarks
This function represents an abstracted entrance to scheduling for the ActivityLang and is relevant for recursive forwarding of activations and notifications. The concrete implementation needs some further contextual information, which is passed down here as a nested sub-context.

Definition at line 463 of file scheduler.hpp.

References Scheduler::layer1_, Scheduler::layer2_, SchedulerCommutator::postChain(), ActivationEvent::refineTo(), Scheduler::ExecutionCtx::rootEvent, Scheduler::sanityCheck(), and Scheduler::ExecutionCtx::scheduler_.

+ Here is the call graph for this function:

◆ work()

void work ( Time  now,
size_t  qualifier 
)
inline

λ-work : transition Managment-Mode -> Work-Mode

  • drop the Grooming-Token (allow concurrent execution from now on)
  • signal start time of actual processing
    Warning
    current thread is expected to hold the Grooming-Token

Definition at line 479 of file scheduler.hpp.

References EngineObserver::dispatchEvent(), SchedulerCommutator::dropGroomingToken(), Scheduler::engineObserver_, Scheduler::layer2_, Scheduler::ExecutionCtx::scheduler_, and WorkTiming::start().

+ Here is the call graph for this function:

◆ done()

void done ( Time  now,
size_t  qualifier 
)
inline

λ-done : signal end time of actual processing

Definition at line 487 of file scheduler.hpp.

References EngineObserver::dispatchEvent(), Scheduler::engineObserver_, Scheduler::ExecutionCtx::scheduler_, and WorkTiming::stop().

+ Here is the call graph for this function:

◆ tick()

activity::Proc tick ( Time  now)
inline

λ-tick : scheduler management duty cycle

Definition at line 494 of file scheduler.hpp.

References Scheduler::handleDutyCycle(), vault::gear::activity::PASS, and Scheduler::ExecutionCtx::scheduler_.

+ Here is the call graph for this function:

◆ getSchedTime()

Time getSchedTime ( )
inline

access high-resolution-clock, rounded to µ-Ticks

Definition at line 502 of file scheduler.hpp.

References Scheduler::getSchedTime(), and Scheduler::ExecutionCtx::scheduler_.

+ Here is the call graph for this function:

Member Data Documentation

◆ scheduler_

◆ rootEvent

ActivationEvent rootEvent

Definition at line 444 of file scheduler.hpp.

Referenced by Scheduler::ExecutionCtx::post().

+ Inheritance diagram for Scheduler::ExecutionCtx:
+ Collaboration diagram for Scheduler::ExecutionCtx:

The documentation for this class was generated from the following file: