func (w *Worker) Stop() error {
	if !w.Latch.CanStop() {
		return ex.New(ErrCannotStop)
	}
	w.Latch.WaitStopped()
	w.Latch.Reset()
	return nil
}
// Stop stops the worker.
//
// If there is an item left in the work channel
// it will be processed synchronously.
Stop stops the worker.

If there is an item left in the work channel
it will be processed synchronously.
// Stop stops the worker . // // If there is an item left in the work channel // it will be processed synchronously .
func (w *Worker) Stop() error {
	if !w.Latch.CanStop() {
		return ex.New(ErrCannotStop)
	}
	w.Latch.WaitStopped()
	w.Latch.Reset()
	return nil
}
func ( w * Worker ) Stop ( ) error { if ! w . Latch . CanStop ( ) { return ex . New ( ErrCannotStop ) } w . Latch . WaitStopped ( ) w . Latch . Reset ( ) return nil }
Stop stops the worker.
Stop stops the worker .