Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MuxSemaphore ¶ added in v0.19.0
type MuxSemaphore struct {
// contains filtered or unexported fields
}
MuxSemaphore is a helper for managing rendezvous with the mux at certain points during execution.
func NewMuxSemaphore ¶ added in v0.19.0
func NewMuxSemaphore(count int) *MuxSemaphore
NewMuxSemaphore creates a new MuxSemaphore with the specified count.
- count is the number of iterations the mux will execute before pausing
func (*MuxSemaphore) OnLoop ¶ added in v0.19.0
func (m *MuxSemaphore) OnLoop()
OnLoop is to be called from your mux test hook. panics if the pause/resume cycle takes more than 5s.
func (*MuxSemaphore) Release ¶ added in v0.19.0
func (m *MuxSemaphore) Release(count int)
Release - call this to resume the mux with a new count (zero-based)
- count is the number of iterations the mux will execute before pausing, pass -1 to close the semaphore
panics if the wait exceeds 5s.
func (*MuxSemaphore) Wait ¶ added in v0.19.0
func (m *MuxSemaphore) Wait()
Wait - blocks until the mux is paused. panics if the wait exceeds 5s.
Click to show internal directories.
Click to hide internal directories.