mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
avoiding deadlock in mark passing calculator;
This is an aftermath to the loading of mark passings from the DB. If mark passings with the correct fingerprint were found, the queue of updates for the mark passing calculator is cleared using queue.clear(). This, however, may happen between the two synchronized blocks in the Listen.run() method, after the queue was checked for isEmpty() and before the queue.take() call is issued. In this case, queue.take() will wait forever. To fix this, the stop() method is called which will always insert an endMarker into the queue so that the queue.take() method will at least find that.
This commit is contained in:
Reference in New Issue
Block a user