Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorOrFinish2 ¶
func ExecuteAsync ¶
Types ¶
type CancelSignal ¶
type CancelSignal struct {
// contains filtered or unexported fields
}
CancelSignal is a signal passed to goroutine, in order to cancel the goroutine on demand.
func NewCloseSignal ¶
func NewCloseSignal() *CancelSignal
NewCloseSignal creates a new CancelSignal.
func (*CancelSignal) Cancelled ¶
func (v *CancelSignal) Cancelled() bool
func (*CancelSignal) FinishThread ¶
func (v *CancelSignal) FinishThread()
FinishThread signals that current goroutine has finished.
func (*CancelSignal) WaitForCancel ¶
func (v *CancelSignal) WaitForCancel() <-chan struct{}
WaitForCancel should be monitored by the goroutine for when to stop.
func (*CancelSignal) WaitForDone ¶
func (v *CancelSignal) WaitForDone()
WaitForDone is used by caller to wait for the goroutine finishes.
func (*CancelSignal) WaitThread ¶
func (v *CancelSignal) WaitThread()
Click to show internal directories.
Click to hide internal directories.