elizarov
03/04/2017, 8:17 AMrun
invocations from the actual logic:
suspend fun doSomeFileOp() = run(fileContext) {
// some blocking file-manipulating code here
}
Now, if you place all this file ops into a separate MyFileOps.kt
file, you can make fileContext
private to that file and the encapsulation will be total.