louiscad
03/31/2018, 12:21 PMwithContext(YourCoroutineContextDesignedForHeavyOperation) { heavyWork() }
- Enforce not calling it on some thread (something like check(!isUiThread) if you are on Android) that is not designed for such heavy work
- Create an annotation named something like @HeavyWork annotated with @Documented, if making the devs that read the docs aware that it's heavy is enough (I don't think it is if you want my thoughts)