Fix shutdown issues with scan and callback.
The main reason for this merge proposal is the change to "public" API functions. Use atomic counter to resolve data race on threadsRunning in callback. Split up callbackShutdown() and scanShutdown() into two phases *Stop() and *Cleanup(). The *Stop() functions signal worker threads, and wait for them to exit. The *Cleanup() functions actually reclaim global resources. These two mechanisms have couplings which are quite complex. I/O Intr scans involve both scan lists and callbacks.
This commit is contained in:
committed by
Andrew Johnson
parent
5eb49ebaf0
commit
fefe6fd1fc
@@ -184,7 +184,8 @@ MAIN(callbackParallelTest)
|
||||
free(pcbt[i]);
|
||||
}
|
||||
|
||||
callbackShutdown();
|
||||
callbackStop();
|
||||
callbackCleanup();
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user