Discover Packages
github.com/acln0/grpc-go
internal
grpcsync
package
Version:
v0.0.0-...-7d1ee88
Opens a new window with list of versions in this module.
Published: Feb 28, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package grpcsync implements additional synchronization primitives built upon
the sync package.
func OnceFunc(f func()) func()
OnceFunc returns a function wrapping f which ensures f is only executed
once even if the returned function is executed multiple times.
Event represents a one-time event that may occur in the future.
NewEvent returns a new, ready-to-use Event.
func (e *Event ) Done() <-chan struct{}
Done returns a channel that will be closed when Fire is called.
Fire causes e to complete. It is safe to call multiple times, and
concurrently. It returns true iff this call to Fire caused the signaling
channel returned by Done to close.
HasFired returns true if Fire has been called.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.