package latch
import "github.com/mesos/mesos-go/api/v1/lib/extras/latch"
Index ¶
Types ¶
type Interface ¶
type Interface interface { // Done returns a chan that blocks until Close is called. It never returns data. Done() <-chan struct{} // Close closes the latch; all future calls to Closed return true. Safe to invoke multiple times. Close() // Closed returns false while the latch is "open" and true after it has been closed via Close. Closed() bool }
Interface funcs are safe to invoke concurrently.
func New ¶
func New() Interface
New returns a new "open" latch such that Closed returns false until Close is invoked.
type L ¶
type L struct {
// contains filtered or unexported fields
}
func (*L) Close ¶
func (l *L) Close()
Close may panic for an uninitialized L
func (*L) Closed ¶
func (*L) Done ¶
func (l *L) Done() <-chan struct{}
func (*L) Reset ¶
Reset clears the state of the latch, not safe to execute concurrently with other L methods.
Source Files ¶
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 2 hours ago –
Tools for package owners.