Documentation
¶
Overview ¶
Package preempt implements cooperative scheduling for preemptable functions that can await keys produced by other functions.
Index ¶
Constants ¶
View Source
const ErrUnresolvable errors.Kind = "unresolvable key"
ErrUnresolvable is an error that indicates that Await could not complete.
Variables ¶
This section is empty.
Functions ¶
func Await ¶
Await blocks until the given key has been produced by another Preemptable function. It returns immediately if the key was already completed. This function must only be called from within Run, using the given context.
Types ¶
Click to show internal directories.
Click to hide internal directories.