We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something like this?
interface AsyncTransactionTask<T> { Single<T> execute(); } public <T> Single<T> transactionAsync(@NonNull final AsyncTransactionTask task) { return Single.create(new Single.OnSubscribe<Single<T>>() { @Override public void call(SingleSubscriber<? super Single<T>> subscriber) { subscriber.onSuccess(task.execute()); } }).flatMap(new Func1<Single<T>, Single<? extends T>>() { @Override public Single<? extends T> call(Single<T> single) { return single; } }); }
The text was updated successfully, but these errors were encountered:
I have tried some transaction APIs based on observables, but they are difficult to understand.
I'll provide a low-level interface for transactions to use them with asynchronous tasks, and transactionAsync() will be removed.
transactionAsync()
Sorry, something went wrong.
No branches or pull requests
Something like this?
The text was updated successfully, but these errors were encountered: