Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
A Mutex is a mutual exclusion lock.
Building with `deadlock` flag will use Mutex in mutex_deadlock.go instead of this to detect deadlocks.
type RWMutex ¶
An RWMutex is a reader/writer mutual exclusion lock.
Building with `deadlock` flag will use RWMutex in mutex_deadlock.go instead of this to detect deadlocks.
type ResultNotifier ¶
type ResultNotifier struct {
// contains filtered or unexported fields
}
ResultNotifier can be used for a goroutine to notify others that a job is done and pass the error occurred or nil if no error.
It's based on `sync.Cond`.
func NewResultNotifier ¶
func NewResultNotifier(l sync.Locker) *ResultNotifier
NewResultNotifier creates a ResultNotifier.
func (*ResultNotifier) Done ¶
func (r *ResultNotifier) Done() chan error
Done returns a channel that can be waited on for the job to finish and to receive the error occurred or nil if no error.
func (*ResultNotifier) Finish ¶
func (r *ResultNotifier) Finish(err error)
Finish notifies that the job is done with the error occurred or nil if no error.