Closed xpzouying closed 6 years ago
Fix #48
consumingStopped in redisQueue has data race when call StopConsuming(), because read in consume() and write in StopConsuming() in concurrency,
Use atomic.LoadInt32/StoreInt32 to change consumingStopped status to ensure safety in multiple goroutine.
Thank you!
Fix #48
consumingStopped in redisQueue has data race when call StopConsuming(), because read in consume() and write in StopConsuming() in concurrency,
Use atomic.LoadInt32/StoreInt32 to change consumingStopped status to ensure safety in multiple goroutine.