https://kotlinlang.org logo
#coroutines
Title
# coroutines
m

Martin Nordholts

06/05/2020, 7:20 PM
Hi, I get Inappropriate blocking method call (
BlockingMethodInNonBlockingContext
) on the
exec()
call in this code, but this is a false positive, right? Since I run with
<http://Dispatchers.IO|Dispatchers.IO>
I don’t see how the code would be problematic:
Copy code
suspend fun String.test() = withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
    Runtime.getRuntime().exec(this@test)
}
o

octylFractal

06/05/2020, 7:21 PM
I'm surprised that intellij even marks that like that, it looks fine. there's probably a related bug on youtrack
10 Views