System kernel and Python runtime interfaces.
collections
closeNone
close(fds)
Close the file descriptors produced by the iterable.
retainedNone
retained(fds)
Preserve the given file descriptors across process image substitutions(exec).
releasedNone
released(fds)
Configure the file descriptors to be released when the process is substituted(exec).
hostnamestr
hostname()
Retrieve the hostname of the system using gethostname(2).
machinetuple[str, str]
machine()
Retrieve the system name and instruction architecture of the runtime using uname(2).
clockticksint
clockticks()
Retrieve the sysconf value of SC_CLK_TCK.
signalexitNone
signalexit(signo)
Configure an atexit call to force the process to exit via a signal.
initialize
initialize()
Initialize the after fork callbacks. Called once by process. Do not use directly.
Ports
File descriptor vector.
Ports__init__
__init__(self, fds)
Event
Event data union and scheduling identity.
Eventtypestr
A string identifying the type of event.
Eventport
A file descriptor identifying the source of events.
Eventcorrelation
For I/O, a file descriptor identifying the cited opposition of port. May be -1.
Eventinputint
Position independent access to the file descriptor identifying the receive side.
For io-transmit events, this is the correlation. For io-receive events, this is the port.
Eventoutputint
Position independent access to the file descriptor identifying the transmit side.
For io-transmit events, this is the port. For io-receive events, this is the correlation.
Eventmeta_actuate
meta_actuate(Class)
Construct an event that will occur upon the actuation of the Scheduler instance that the operation was dispatched on.
Eventmeta_terminate
meta_terminate(Class)
Construct an event that will occur upon the termination of the Scheduler instance that the operation was dispatched on.
Eventnever
never(Class, reference)
Construct an event that is known to never occur.
Eventtime
time(Class, nanosecond)
Construct an event that will occur after the specified duration occurs.
Eventprocess_exit
process_exit(Class, pid)
Construct an event identifier that will occur when process identified by pid exits. If procfd is given on supporting systems, it will be used instead of allocating one or using the pid directly.
Eventprocess_signal
process_signal(Class, signo)
Construct an event identifier that will occur when the host process receives the cited signal. If sigfd is given on supporting systems, it will be used instead of allocating one or using the signo directly.
Eventfs_status
fs_status(Class, path)
Construct an event identifier that will occur when the status of the file identified by path, or fileno, has changed.
Eventfs_delta
fs_delta(Class, path)
Construct an event identifier that will occur when the file identified by path, or fileno, is modified.
Eventfs_void
fs_void(Class, path)
Construct an event identifier that will occur when the file identified by path, or fileno, is deleted.
Eventio_transmit
io_transmit(Class, port)
Event identifier that occurs when writes are possible on the given port file descriptor.
Eventio_receive
io_receive(Class, port)
Event identifier that occurs when reads are possible on the given port file descriptor.
Link
An operation record to be dispatched by a Scheduler instance.
Link__new__
__new__()
Linkcontextobject
User storage slot intended to hold a reference to the object that created the Link.
LinkeventEvent
The original event that the Link was planned using.
Linktaskcollections.abc.Callable
The object that will be executed when the event occurs.
Linkcyclicbool
Whether or not the operation was dispatched with the expectation of multiple occurrences.
Linkcancelledbool
Whether or not the operation has been removed from the scheduled set.
Linkdispatchedbool
Whether or not the operation has been scheduled.
Linkexecutingbool
Whether or not the operation is currently executing.
Scheduler
Kernel event management and task queue.
Scheduleroperationscollections.abc.Sequence[Link]
operations(self)
Construct a snapshot of the dispatched operations.
Schedulervoid
void(self)
Immediately destroy the resources held by the scheduler.
Schedulerclosedbool
Whether the scheduler has been closed.
Schedulerclose
close(self)
Close the scheduler causing events from the kernel to no longer be retrieved.
Schedulerwaitint
wait(self)
Wait for events from the source(operating system) and enqueue their associated tasks for execution.
SchedulerwaitReturns
The count of events that were received from the kernel.
Schedulerinterruptbool
interrupt(self)
Interrupt a blocking wait call. Nothing if there is no concurrent wait call.
SchedulerinterruptReturns
Whether or not a wait call was interrupted. None if the Scheduler instance is closed.
Schedulerexecuteint
execute(self, trap)
Execute enqueued tasks, FIFO. Concurrent calls with wait are prohibited.
SchedulerexecuteParameters
SchedulerexecuteReturns
The count of tasks that were executed.
Schedulerdispatch
dispatch(self, operation)
Execute the operation when its associated event occurs.
SchedulerdispatchParameters
Schedulercancel
cancel(self, operation)
Remove the operation from the scheduled set.
Schedulerenqueue
enqueue(self, task)