AG
08/30/2020, 4:30 PMInvalidMutabilityException
class Api {
private val client = HttpClient()
var address = Url("<https://tools.ietf.org/rfc/rfc1866.txt>")
fun request(callback: (String) -> Unit) {
GlobalScope.apply {
launch(ApplicationDispatcher) {
val result: String = client.get {
url(address.toString())
}
callback(result)
}
}
}
}
John O'Reilly
08/30/2020, 5:02 PMnative-mt
branch of Kotlinx Coroutines but this is only fully supported in Kotlin/Native using CIO
engine I believe (and only for http endpoints). (EDIT: my previous statement about only being supported in CIO is not correct, see below!).....but that crash still occurs with that setup if logging is enabled ( @russhwolf identified that and created that 2nd issue).AG
08/30/2020, 6:31 PMrusshwolf
08/30/2020, 7:18 PMJohn O'Reilly
08/30/2020, 7:19 PMrusshwolf
08/30/2020, 7:19 PMJohn O'Reilly
08/30/2020, 7:21 PMrusshwolf
08/30/2020, 7:25 PMnative-mt
was.John O'Reilly
08/30/2020, 7:51 PM