diff --git a/src/main/kotlin/app/git/FileChangesWatcher.kt b/src/main/kotlin/app/git/FileChangesWatcher.kt index c32c8ce..f5db720 100644 --- a/src/main/kotlin/app/git/FileChangesWatcher.kt +++ b/src/main/kotlin/app/git/FileChangesWatcher.kt @@ -1,6 +1,8 @@ package app.git +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.flowOn import java.io.IOException import java.nio.file.* import java.nio.file.StandardWatchEventKinds.* @@ -42,6 +44,6 @@ class FileChangesWatcher @Inject constructor() { key.pollEvents() key.reset() } - } + }.flowOn(Dispatchers.IO) } \ No newline at end of file