# Warning "Inappropriate blocking method call" with coroutines, how to fix?

**URL:** <https://discuss.kotlinlang.org/t/warning-inappropriate-blocking-method-call-with-coroutines-how-to-fix/16903>\
**Category:** Support\
**Created:** [March 31, 2020, 2:38pm UTC](https://discuss.kotlinlang.org/t/warning-inappropriate-blocking-method-call-with-coroutines-how-to-fix/16903 "2020-03-31T14:38:52Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Beholder](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/beholder/32/2078_2.png) [@Beholder](https://discuss.kotlinlang.org/u/Beholder)\
**Post date:** [March 31, 2020, 7:37pm UTC](https://discuss.kotlinlang.org/t/warning-inappropriate-blocking-method-call-with-coroutines-how-to-fix/16903/5 "2020-03-31T19:37:37Z")

</div>

It’s not the compiler, but IDEA inspection.  
Jetbrains is trying to make clever “guess” - if your method throws IOException, it should dispached on IO thread pool.

How to avoid warning:

1. Remove `@Throws`, Kotlin don’t need it
2. Suppress warning in IDEA with annotation `@Suppress("BlockingMethodInNonBlockingContext")`
3. Tried, but not worked for me - create your own custom annotation for functions and add it to “non-blocking” list in inspection settings

---

_[View the full topic](https://discuss.kotlinlang.org/t/warning-inappropriate-blocking-method-call-with-coroutines-how-to-fix/16903)._
