Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockable ¶
type Blockable interface { // IDs that this object is blocking on Dependencies() set.Set[ids.ID] // Notify this object that an event has been fulfilled Fulfill(context.Context, ids.ID) // Notify this object that an event has been abandoned Abandon(context.Context, ids.ID) // Update the state of this object without changing the status of any events Update(context.Context) }
Blockable defines what an object must implement to be able to block on dependent events being completed.
type Blocker ¶
Blocker tracks Blockable events. Blocker is used to track events that require their dependencies to be fulfilled before them. Once a Blockable event is registered, it will be notified once any of its dependencies are fulfilled or abandoned.
func (*Blocker) Abandon ¶
Abandon notifies all objects blocking on the event whose ID is <id> that the event has been abandoned
func (*Blocker) Fulfill ¶
Fulfill notifies all objects blocking on the event whose ID is <id> that the event has happened
func (*Blocker) Len ¶ added in v1.9.8
Returns the number of items that have dependencies waiting on them to be fulfilled
func (*Blocker) PrefixedString ¶
PrefixedString returns the same value as the String function, with all the new lines prefixed by [prefix]