-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bounded queues for the EventHandler thread (#58)
* Bounded queue for the EventHandler thread The unbounded queue fronting the 'event' thread can cause trouble when the EventHandler is unable to keep up with the workload. This can lead to heap exhaustion, GC issues and failure modes that are generally considered "bad". Band-aid over this with a semaphore to limit the number of tasks in the queue. The semaphore is opt-in and disabled by default to avoid any nasty surprises for folks upgrading. Also add 'EventSource.awaitClosed()' to allow users to wait for underlying thread pools to completely shut down. We can't know if it's safe to clean up resources used by the EventHandler thread if we can't be certain that it has completely terminated. * Address checkstyle griping in StubServer * Fix JavaDoc issue * Tighten up exception handling Co-authored-by: Eli Bishop <eli@launchdarkly.com>
- Loading branch information
1 parent
60665a2
commit cea3f23
Showing
5 changed files
with
254 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.