Sitemap
1 min readNov 9, 2018

Only functions that are using blocking methods should be wrapped into withContext, so your example is correct, because neither Repository nor Remote are invoking a blocking function, because we follow a convention that suspending functions do not block and Api already took care to follow this convention.

Roman Elizarov
Roman Elizarov

Written by Roman Elizarov

Project Lead for the Kotlin Programming Language @JetBrains

No responses yet