Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncedQ ¶
func NewSyncedQ ¶
func NewSyncedQ() *SyncedQ
type WaitForSet ¶
type WaitForSet struct {
// contains filtered or unexported fields
}
Continously usable, instantiated once for many wait()/set() calls. Fails if wait() is not ready when set() is called. Usage:
w:=NewWaitForSet() w.Start(5*time.Second) ... // sync/async call to w.Set() ... v,err := w.WaitForSet() if err!=nil { }
func NewWaitForSet ¶
func NewWaitForSet() *WaitForSet
func (*WaitForSet) Cancel ¶
func (w *WaitForSet) Cancel()
In case waitforset() is not going to be called.
func (*WaitForSet) Set ¶
func (w *WaitForSet) Set(v any) error
Fails if not able to set while get() is ready.
func (*WaitForSet) Start ¶
func (w *WaitForSet) Start(timeout time.Duration)
func (*WaitForSet) WaitForSet ¶
func (w *WaitForSet) WaitForSet() (any, error)
Click to show internal directories.
Click to hide internal directories.