-
Notifications
You must be signed in to change notification settings - Fork 884
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of marking the handle as not running by setting the handler's value in the map to false, we now remove simply the key if there is no handler running. This also means we no longer need to use a weak hash map for this. Also reduce the size of the synchronized blocks, mainly by scheduling the handler outside of the synchronized(threadActiveMap) block. Make some code better readable and add some more comments. Also do start a new handler thread if the task threw.
- Loading branch information
Showing
1 changed file
with
41 additions
and
22 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