Crate pulse [] [src]

Structs

Barrier

A Barrier can listen for 1 or more Signals. It will only transition to a Pulsed state once all the Signals have Pulsed.

Pulse

A Pulse is represents an unfired signal. It is the tx side of Signal A Pulse can only purpose it to be fired, and then it will be moved as to never allow it to fire again. Dropping a pulse will pulse The signal, but the signal will enter an error state.

Select

A Select listens to 1 or more signals. It will wait until any signal becomes available before Pulsing. Select will then return the Signal that has been Pulsed. Select has no defined ordering of events for Signals when there are more then one Signals pending.

SelectMap

SelectMap is a wrapper around a Select rather then use a unique id to find out what signal has been asserts, SelectMap will return an supplied object.

Signal

A Signal represents listens for a pulse to occur in the system. A Signal has one of three states. Pending, Pulsed, or Errored. Pending means the pulse has not fired, but still exists. Pulsed meaning the pulse has fired, and no longer exists. Errored means the pulse was dropped without firing. This normally means a programming error of some sort.

ThreadScheduler

This is the default system scheduler that is used if no user provided scheduler is installed. It is very basic and will block the OS thread using thread::park

Enums

SignalState

Described the possible states of a Signal

TimeoutError

Represents the possible errors from a wait timeout

WaitError

Represents the possible errors that can occur on a Signal

Traits

Scheduler

This is the hook into the async wait methods provided by pulse. It is required for the user to override the current system scheduler.

Signals

allows an object to assert a wait signal

Functions

swap_scheduler

Replace the current Scheduler with your own supplied scheduler. all wait() commands will be run through this scheduler now.

with_scheduler

Call the suppled closure using the supplied schedulee