Last active
April 30, 2018 02:20
-
-
Save tcw165/8211ff20c89da775894428f4287db3eb to your computer and use it in GitHub Desktop.
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
| public final class ConsumerSingleObserver<T> | |
| extends AtomicReference<Disposable> | |
| implements SingleObserver<T>, | |
| Disposable, | |
| LambdaConsumerIntrospection { | |
| // ... | |
| @Override | |
| public void onSubscribe(Disposable d) { | |
| DisposableHelper.setOnce(this, d); | |
| } | |
| @Override | |
| public void onSuccess(T value) { | |
| lazySet(DisposableHelper.DISPOSED); | |
| try { | |
| onSuccess.accept(value); | |
| } catch (Throwable ex) { | |
| // ... | |
| } | |
| } | |
| @Override | |
| public void dispose() { | |
| DisposableHelper.dispose(this); | |
| } | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment