elizarov
03/04/2017, 8:13 AMval fileContext = newFixedThreadPoolContext(n) to create a separate thread pool for your file operations.
2. Whenever you need to do a file op from some other coroutine, use run to switch into the fileContext:
run(fileContext) { 
   // do blocking file ops here
}
The coroutine that invokes run will get suspended until the blocking file operation in your pool completes.