Remove pool of FileManager actors (#11036)

close #10970

Changelog:
- remove: FileManager actors pool

Language Server executes IO on a separate thread pool for blocking operations and does not block the actor
This commit is contained in:
Dmitry Bushev 2024-09-11 11:15:54 +03:00 committed by GitHub
parent 8b5c6338f7
commit bea9e068b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 11 deletions

View File

@ -222,7 +222,7 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: Level) {
new ContentRootManagerWrapper(languageServerConfig, contentRootManagerActor) new ContentRootManagerWrapper(languageServerConfig, contentRootManagerActor)
lazy val fileManager = system.actorOf( lazy val fileManager = system.actorOf(
FileManager.pool( FileManager.props(
languageServerConfig.fileManager, languageServerConfig.fileManager,
contentRootManagerWrapper, contentRootManagerWrapper,
fileSystem, fileSystem,

View File

@ -2,7 +2,6 @@ package org.enso.languageserver.filemanager
import akka.actor.{Actor, Props} import akka.actor.{Actor, Props}
import akka.pattern.pipe import akka.pattern.pipe
import akka.routing.SmallestMailboxPool
import com.typesafe.scalalogging.LazyLogging import com.typesafe.scalalogging.LazyLogging
import org.enso.languageserver.data.FileManagerConfig import org.enso.languageserver.data.FileManagerConfig
import org.enso.languageserver.effect._ import org.enso.languageserver.effect._
@ -323,13 +322,4 @@ object FileManager {
exec: Exec[BlockingIO] exec: Exec[BlockingIO]
): Props = ): Props =
Props(new FileManager(config, contentRootManager, fs, exec)) Props(new FileManager(config, contentRootManager, fs, exec))
def pool(
config: FileManagerConfig,
contentRootManager: ContentRootManager,
fs: FileSystem,
exec: Exec[BlockingIO]
): Props =
SmallestMailboxPool(config.parallelism)
.props(props(config, contentRootManager, fs, exec))
} }