Skip to content
New issue

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

Add Completable.asWorker() operator. #423

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

zach-klippenstein
Copy link
Collaborator

Closes #422.

@zach-klippenstein zach-klippenstein added this to the kotlin v0.18.0 milestone Jun 25, 2019
@zach-klippenstein zach-klippenstein added this to In progress in Workflow (Kotlin) via automation Jun 25, 2019
* The [Completable] will be subscribed to when the [Worker] is started, and disposed when it is
* cancelled.
*/
fun Completable.asWorker(key: String = "") =
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key should be required since there is no distinguishing type.

* distinguish workers.
*/
fun Completable.asWorker(key: String) =
Worker.createSideEffect(key) { await() }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez

@zach-klippenstein zach-klippenstein merged commit 01ad7f7 into master Jun 26, 2019
Workflow (Kotlin) automation moved this from In progress to Done Jun 26, 2019
@zach-klippenstein zach-klippenstein deleted the zachklipp/completable-asworker branch June 26, 2019 05:22
@zach-klippenstein zach-klippenstein added the kotlin Affects the Kotlin library. label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kotlin Affects the Kotlin library.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Add Completable.asWorker() extension
2 participants