This commit is contained in:
bluepython508 committed 2026-10-22 12:27:19 +01:00
1 parent 3530afb854
commit 6903fcff27
2146 files changed
+112256 -190703

No files matched your search

+17
View File
@@ -154,6 +154,15 @@ func (e *Entry) Init(eventListener EventListener, mask EventMask) {
e.mask = mask
}
// SetQueuedMask changes the entry mask.
//
// Preconditions: The Entry must be registered to the given Queue.
func (e *Entry) SetQueuedMask(q *Queue, mask EventMask) {
q.mu.Lock()
e.mask = mask
q.mu.Unlock()
}
// Mask returns the entry mask.
func (e *Entry) Mask() EventMask {
return e.mask
@@ -201,6 +210,14 @@ func NewFunctionEntry(mask EventMask, fn func(EventMask)) (e Entry) {
return e
}
// NoopListener is an EventListener that does nothing.
//
// +stateify savable
type NoopListener struct{}
// NotifyEvent implements EventListener.NotifyEvent.
func (NoopListener) NotifyEvent(mask EventMask) {}
// Queue represents the wait queue where waiters can be added and
// notifiers can notify them when events happen.
//