Coroutines is not launched in Intellij Idea plugin
已回答
I tried to use coroutines in my plugin, but I can not launch it by:
GlobalScope.launch
CoroutineScope(Job() + Dispatchers.IO)
Is it possible to use coroutines in plugin development?
请先登录再写评论。
It is possible to work with coroutines. The following snippet should work:
launch(CoroutineScope(Job() + Dispatchers.IO)) {// ...
}
Do I have to add coroutine dependency? I can not find the `launch` method you mentioned.
Definitely:
I tried, but still couldn't find the method you mentioned. The version I used is `1.3.7`.
Such methods are available in 1.3.7: