kirillrakhman
04/13/2017, 9:44 AMsuspend fun <T> wrapCallback(function: ((T) -> Any) -> Any): T = suspendCoroutine { c ->
function(c::resume)
}
but it requires that the callback function accepts kotlin's function types which most of the time it doesn't