-
-
Save pyadav/0f573968f3febcf6ff4a30e02145244c to your computer and use it in GitHub Desktop.
rxjava worker thread example
This file contains hidden or 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
| final Scheduler.Worker worker = Schedulers.newThread().createWorker(); | |
| worker.schedule(new Action0() { | |
| @Override | |
| public void call() { | |
| if (!mAnimationSet.isStarted()) { | |
| removeViewAt(0); | |
| worker.unsubscribe(); | |
| } else { | |
| worker.schedule(this, 500, TimeUnit.MILLISECONDS); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment