Created
January 30, 2018 22:51
-
-
Save lwahlmeier/6a887e4ee6abb3b4429e397f147988cf 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
protected void callReader(boolean onClientThread) { | |
final Runnable localReaderCaller = this.readerCaller; | |
if (readerCaller != null) { | |
if (onClientThread) { | |
readerCaller.run(); | |
} else { | |
getClientsThreadExecutor().execute(()->{ | |
if(localReaderCaller == readerCaller) { | |
readerCaller.run(); | |
} | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment