Netflix / blitz4j

Logging framework for fast asynchronous logging
Apache License 2.0
561 stars 118 forks source link

set shutdown flag to true in stop() method before waiting for empty queu... #2

Closed maximecaron closed 11 years ago

maximecaron commented 11 years ago

...e

After a quiet period the batch size and queue size might be empty thus ending the while loop but some new message had a chance to be added to the queue before the flag was set. Thus calling the stop() method from a different thread than the one calling process was not threadsafe!