android, desktop: switching C calls to IO threads (#3727)
This commit is contained in:
parent
db93d29e76
commit
97fbf2b7fe
@ -465,7 +465,7 @@ object ChatController {
|
||||
suspend fun sendCmd(rhId: Long?, cmd: CC): CR {
|
||||
val ctrl = ctrl ?: throw Exception("Controller is not initialized")
|
||||
|
||||
//return withContext(Dispatchers.IO) {
|
||||
return withContext(Dispatchers.IO) {
|
||||
val c = cmd.cmdString
|
||||
chatModel.addTerminalItem(TerminalItem.cmd(rhId, cmd.obfuscated))
|
||||
Log.d(TAG, "sendCmd: ${cmd.cmdType}")
|
||||
@ -476,8 +476,8 @@ object ChatController {
|
||||
Log.d(TAG, "sendCmd response json $json")
|
||||
}
|
||||
chatModel.addTerminalItem(TerminalItem.resp(rhId, r.resp))
|
||||
return r.resp
|
||||
//}
|
||||
r.resp
|
||||
}
|
||||
}
|
||||
|
||||
private fun recvMsg(ctrl: ChatCtrl): APIResponse? {
|
||||
|
Loading…
Reference in New Issue
Block a user