forked from mirror/ants
optimization
This commit is contained in:
parent
d9363d36ec
commit
92a7dec196
|
@ -55,7 +55,7 @@ func (w *Worker) run() {
|
||||||
|
|
||||||
// stop this worker.
|
// stop this worker.
|
||||||
func (w *Worker) stop() {
|
func (w *Worker) stop() {
|
||||||
w.task <- nil
|
w.sendTask(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sendTask sends a task to this worker.
|
// sendTask sends a task to this worker.
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (w *WorkerWithFunc) run() {
|
||||||
|
|
||||||
// stop this worker.
|
// stop this worker.
|
||||||
func (w *WorkerWithFunc) stop() {
|
func (w *WorkerWithFunc) stop() {
|
||||||
w.args <- nil
|
w.sendTask(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sendTask sends a task to this worker.
|
// sendTask sends a task to this worker.
|
||||||
|
|
Loading…
Reference in New Issue