Executive processors containing a primitive execution unit.
os
types0
collections0
functools0
typing0
errno0
signal0
heapq0
core0
weak0
execution0
Call0
A single callable represented as a Processor. Used as an abstraction for explicit enqueues, and to trigger faults in Sectors.
This should be rarely used in practice.
Callc_execution0
c_execution(self)
Callpartial0
partial(Class, call, *args, **kw)
Create a call applying the arguments to the callable upon actuation. The positional arguments will follow the Sector instance passed as the first argument.
Call__init__0
__init__(self, call)
The partial application to the callable to perform. Usually, instantiating from partial is preferrable; however, given the presence of a functools.partial instance, direct initialization is better.
Call__init__Parameters
calltyping.Callable
The callable to enqueue during actuation of the Processor.
Callactuate0
actuate(self)
Callstructure10%
structure(self)
Callterminate10%
terminate(self)
Coroutine0
Processor for coroutines.
Manages the generator state in order to signal the containing Sector of its exit. Generator coroutines are the common method for serializing the dispatch of work to relevant Sector instances.
Coroutine__init__10%
__init__(self, coroutine)
Coroutinestate10%
Coroutine_co_complete20%
_co_complete(self)
Coroutinecontainer60%
container(self)
Container for the coroutine's execution in order to map completion to processor exit.
Coroutineactuate40%
actuate(self)
Start the coroutine.
Coroutineterminate30%
terminate(self)
Force the coroutine to close.
Coroutineinterrupt10%
interrupt(self)
Thread0
A Processor that runs a callable in a dedicated thread.
Thread__init__10%
__init__(self, callable)
Threadtrap60%
trap(self)
Threadactuate20%
actuate(self)
Create the thread and execute the target.
Exceptions raised by the thread will cause the processor to fault.
Subprocess0
A set of running system processes. Terminates when all members of the set has exited and all subtransactions have completed.
SubprocessProperties
- sp_exit_status
A mapping of process identifiers to their corresponding exit status returned by sp_reaper after an exit event was received.
SubprocessEngineering
While POSIX systems are the target platform, it's still preferrable to abstract the concepts. Everything here dealing with signals should be accessed through the system context.
Subprocess__init__0
__init__(self, reap, invocations)
Subprocesssp_report0
sp_report(self)
Join the System process identifier, invocation object, and exit status.
Subprocessfrom_invocation100%
from_invocation(Class, invocation, stdout, stdin, stderr)
Instantiation from an invocation executed with invocation.spawn. The process' standard I/O must be explicitly designated using the stdin, stdout, and stderr parameters. Process will be reaped with fault.system.execution.reap.
Subprocessfrom_invocationParameters
invocationThe fault.system.execution.KInvocation instance to spawn.
Subprocessxact_void0
xact_void(self, last)
Subprocesssp_exit180%
sp_exit(self, pid)
Subprocessterminate40%
terminate(self)
If the process set isn't terminating, issue SIGTERM to all of the currently running processes.
Subprocessstructure20%
structure(self)
Subprocessactuate0
actuate(self)
Initialize the system event callbacks for receiving process exit events.
Subprocessinterrupt340%
interrupt(self)
Interrupt the running processes by issuing a SIGKILL signal to all active processes. Exit status will be reaped, but not reported to self.
Subprocesssp_only0
The exit event of the only process in the set. None if no exit has occurred or the number of processes exceeds one.
Subprocesssp_waiting0typing.Set[int]
Return the set of process identifiers that have yet to exit.
Subprocesssp_reaped0bool
Whether all the processes have been reaped.
Subprocesssp_signal30%
sp_signal(self, signo)
Send the given signal number (os.kill) to the active processes being managed by the instance.
Subprocesssp_signal_group30%
sp_signal_group(self, signo)
Send the given signal number (os.kill) to the active processes being managed by the instance.
Subprocesssp_abort30%
sp_abort(self)
Interrupt the running processes by issuing a SIGQUIT signal.
Coprocess0
A local parallel process whose termination is connected to an instance.
Coprocess__init__20%
__init__(self, identifier, application)
Coprocesscp_process_exit30%
cp_process_exit(self)
Coprocesscp_enqueue10%
cp_enqueue(self, task)
Coprocessstructure20%
structure(self)
Coprocessactuate20%
actuate(self)
Initialize the system event callbacks for receiving process exit events.
Coprocessinterrupt40%
interrupt(self)
Interrupt the running processes by issuing a SIGKILL signal to all active processes. Exit status will be reaped, but not reported to self.
Coprocessterminate50%
terminate(self)
Interrupt the running processes by issuing a SIGQUIT signal.
Recurrence0
Timer maintenance for recurring tasks.
Usually used for short term recurrences such as animations and status updates. Recurrences work by deferring the execution of the configured target after each occurrence. This overhead means that Recurrence is not well suited for high frequency executions, but useful in cases where it is important to avoid overlapping calls.
Recurrence__init__30%
__init__(self, target, frequency)
Recurrenceactuate30%
actuate(self)
Enqueue the initial execution of the recurrence.
Recurrenceoccur20%
occur(self)
Invoke a recurrence and use its return to schedule its next iteration.
Recurrenceterminate20%
terminate(self)
Recurrenceinterrupt20%
interrupt(self)
Scheduler0
Timestamp based transaction scheduling using the system's Real Time clock.
Scheduler__init__0
__init__(self)
Scheduleractuate150%
actuate(self)
Schedulerstructure30%
structure(self)
Scheduler_terminal10%
_terminal(self)
Schedulerterminate0
terminate(self)
Schedulerxact_void0
xact_void(self, final)
Schedulerinterrupt0
interrupt(self)
Scheduleroccur0
occur(self)
Execute the next task given that the period has elapsed. If the period has not elapsed, reschedule transition in order to achieve finer granularity.
Schedulersched_cancel30%
sched_cancel(self, pit, *xacts)
Cancel the given transactions that were scheduled for execution at the given pit.
Aside from the time and transaction, Scheduler has no index for identifying scheduled events. When such a feature is necessary, an index must be managed independently or a subclass must be created.
Schedulersched_insert0
sched_insert(self, pit, *xacts)
Schedule the xacts to be executed at the specified Point In Time, pit.
Schedulersched_update275%
sched_update(self, items)
Scheduler_sched_period0
_sched_period(self, current)
Scheduler_sched_put0int
_sched_put(self, pit, xacts)
Scheduler_sched_get0
_sched_get(self, current)