Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support adding custom dispatchers #207

Open
pjfanning opened this issue Feb 17, 2023 · 6 comments
Open

support adding custom dispatchers #207

pjfanning opened this issue Feb 17, 2023 · 6 comments

Comments

@pjfanning
Copy link
Contributor

Akka/Pekko may already have a mechanism for adding custom dispatcher implementations. I just haven't found anything obvious.

With Java Virtual Threads, it would be nice if an external party could create a custom dispatcher that uses throwaway virtual threads instead of pooling them.

@spangaer
Copy link

spangaer commented Feb 17, 2023

You mean something else than?

  akka.actor {
    default-dispatcher = {
      type = "....MyDispatcherConfigurator"
    }
  }

@pjfanning
Copy link
Contributor Author

something like:

my-dispatcher {
  # Dispatcher is the name of the event-based dispatcher
  type = Dispatcher
  # What kind of ExecutionService to use
  executor = "com.acme.pekko.extensions.JavaVirtualThreadDispatcher"
  ..
}

@spangaer
Copy link

But isn't point that that Configurator can produce a custom dispatcher/executor?

https://gist.github.com/yanns/f7da61c582ab1da3535d#file-gistfile1-scala-L41

@pjfanning
Copy link
Contributor Author

thanks - that gist looks like a good example - maybe we should include something like that in the Pekko docs

@He-Pin
Copy link
Member

He-Pin commented Feb 17, 2023

it's currently using the fork join pool, maybe we can change that as CE to include a WSTP。

@spangaer
Copy link

The what from the what now?

Anyhow, using the fork join pool is also about the interaction with the scala.concurrent.blocking code block of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants