standinga
10/07/2020, 1:33 AMsuspend fun answer() = withContext(coroutineDispatcher) {
x.foo()
}
suspend fun onOfferReceived(it: SignalingServerMessage.SessionDescription) = withContext(coroutineDispatcher) {
val content = it.content
bar()
answer()
}
suspend fun bar(): Unit = x.withLock {
// do something, wait for callback
}