Both global shuttingdown and finished bool variables were prone to data race (as reported by ThreadSanitizer). The commit makes them both atomic.
Both global shuttingdown and finished bool variables were prone to data race (as reported by ThreadSanitizer). The commit makes them both atomic.