Skip to content

Instantly share code, notes, and snippets.

@Randgalt
Last active December 17, 2015 00:18
Show Gist options
  • Save Randgalt/5519586 to your computer and use it in GitHub Desktop.
Save Randgalt/5519586 to your computer and use it in GitHub Desktop.
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