Created
June 20, 2018 07:59
-
-
Save franz1981/cdd4374ad8217d9fee9281db70bb99dd to your computer and use it in GitHub Desktop.
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
if (!tasks.offer(task)) { | |
throw new RejectedExecutionException("back-pressured?"); | |
} | |
if (!running) { | |
lock.lock(); | |
try { | |
condition.signal(); | |
} finally { | |
lock.unlock(); | |
} | |
} | |
return null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment