I'm not sure if creating Handler object is best wa...
# coroutines
b
I'm not sure if creating Handler object is best way to do that
v
You could make
request
into a suspending function. That would mean that it can be called from any coroutine, suspend it, then return a result or throw an exception
suspend fun Client.request(e: Element) {...}
b
honestly, the main question is how to handle interface with three methods in elegant way 🙂 Does java-way like "object: Handler{…}" is the only solution?
v
an unusual question for this channel