<@U0Q3NJ937> If your method does something heavy, ...
# coroutines
l
@Dmytro Danylyk If your method does something heavy, there's a few approaches you can take: - Make it a suspending function that calls
withContext(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)