https://kotlinlang.org logo
#coroutines
Title
# coroutines
a

adambl4

03/06/2017, 12:00 PM
@elizarov have you considered a different name for
suspend fun Completable.await()
since rx.Completable has a member function with the same name?
e

elizarov

03/06/2017, 12:05 PM
adambl4: Yes. Did not found anything good. Meanwhile, I’ve just removed
Completable.await
from Rx 1.x module. It is not a problem with Rx 2.x. It does not have this name conflict (there is no
Completable.await
there)
b

bamdmux

03/06/2017, 12:19 PM
In Rx2 theyre called blockingAwait() which describes better the behaviour
Maybe .suspendAwait() for the ones on kotlinx coroutines?
e

elizarov

03/06/2017, 12:22 PM
await
seems to be a more natural name and you already get a visual cue in IDE that this is a suspending invocation going on.
I like the naming in Rx2 and, since Rx1 is reaching EOL this year, hopefully it is not going to be a long-term issue.
I wish all the blocking methods would have been as clearly marked as in Rx 2 in all the different APIs and libs we have.
b

bamdmux

03/06/2017, 12:33 PM
@elizarov I meant only for the rx1 as a temporary solution. Agree that await is the preferred choice
And yes, a lot of libraries could follow the example of Rx 2
e

elizarov

03/06/2017, 12:45 PM
It is just really a few lines of code. You can copy it from the Rx 2.x lib if you really need it (take it from
develop
branch, though, — there is a bug in master version of Rx2 Completable.await)
4 Views