mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
read-only lock for check of shutdown
This commit is contained in:
parent
9a2a8f964c
commit
1439c316d3
1 changed files with 2 additions and 2 deletions
|
|
@ -146,8 +146,8 @@ func newExecutor(opts ...executorOption) *executor {
|
|||
for running {
|
||||
<-periodic.C
|
||||
func() {
|
||||
e.workMu.Lock()
|
||||
defer e.workMu.Unlock()
|
||||
e.workMu.RLock()
|
||||
defer e.workMu.RUnlock()
|
||||
if e.shutdown {
|
||||
running = false
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue