Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnTerminationRequest ¶
func OnTerminationRequest(f GracefulTerminationFunc) func()
Set up to call the given function (in a goroutine) when a termination request is received. Returns a function which, when called, will remove the callback. Only one callback can be installed at a time.
func Terminate ¶
func Terminate(finishTasks bool)
A graceful termination has been requested. Set a flag so that no further tasks are claimed, and interrupt any running task if `finishTasks` is true
func TerminationRequested ¶
func TerminationRequested() bool
Return true if graceful termination has been requested
Types ¶
type GracefulTerminationFunc ¶
type GracefulTerminationFunc func(bool)
Click to show internal directories.
Click to hide internal directories.