Last active
December 17, 2015 00:18
-
-
Save Randgalt/5519586 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
private void offerOperation(final Operation operation) | |
{ | |
if ( operationsQuantizer.add(operation) ) | |
{ | |
submitToExecutor | |
( | |
new Runnable() | |
{ | |
@Override | |
public void run() | |
{ | |
try | |
{ | |
operationsQuantizer.remove(operation); | |
operation.invoke(); | |
} | |
catch ( Exception e ) | |
{ | |
handleException(e); | |
} | |
} | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment