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

dave08

12/13/2017, 8:30 AM
@louiscad You can't have an actor (maybe with a buffer or conflated) receiving all requests, and handling what to do if there's no connection?
l

louiscad

12/13/2017, 8:33 AM
@dave08 The goal is to wait until the connection can be restored. If the connection can't be made, all the coroutines are suspended, until the connection is explicitly closed with the appropriate method
d

dave08

12/13/2017, 8:44 AM
If you use
send
on the actor, the caller is suspended until the actor is ready to handle it... but it really depends on what exactly you are trying to do... this is one example of how to handle even concurrent requests to your service, and possibly keep a buffer of multiple requests before suspention...
4 Views