Documentation
¶
Overview ¶
Package effectqueue runs the side effects a mutation decided under a state lock after that lock is released, in the order the mutations happened.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue orders effect batches. Add batches in mutation order, either under the lock that orders the mutations or from one goroutine at a time that takes them in that order, and call Drain after releasing that lock. One goroutine drains at a time: a Drain that finds another in progress returns at once and leaves its batch to that goroutine, so an effect can run after its own caller returned, but never before an effect added ahead of it. The zero Queue is ready to use.
Click to show internal directories.
Click to hide internal directories.