Browse Source

Rename var

Vova Tkach 5 years ago
parent
commit
0152c0b7a5
1 changed files with 6 additions and 6 deletions
  1. 6 6
      worker/worker.go

+ 6 - 6
worker/worker.go

@@ -5,10 +5,10 @@ import (
 )
 
 type Worker struct {
-	ctx    context.Context
-	cancel context.CancelFunc
-	chDone chan bool
-	stop   bool
+	ctx     context.Context
+	cancel  context.CancelFunc
+	chDone  chan bool
+	stopped bool
 }
 
 type Callback func(ctx context.Context, w *Worker)
@@ -36,11 +36,11 @@ func (this *Worker) doit(f func(ctx context.Context, w *Worker)) *Worker {
 }
 
 func (this *Worker) Shutdown(ctx context.Context) error {
-	if this.stop {
+	if this.stopped {
 		return nil
 	}
 
-	this.stop = true
+	this.stopped = true
 
 	ctxb := ctx
 	if ctxb == nil {