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

PinnedDispatcher - uses single thread for all actors instead of creating persanal thread for every actor #850

Closed
kantora opened this issue Apr 14, 2015 · 2 comments · Fixed by #860

Comments

@kantora
Copy link
Contributor

kantora commented Apr 14, 2015

In version 0.8.x it created personal thread for every actor. But now it uses single thread for all actors under same dispatcher (so, if you put PinnedDispatcher as default dispatcher - all actors in system will work in single thread without any multythreading).

Also I've found unused variable "running" in it. So, I suppose that thread will last forever, even after actor's death.

@rogeralsing
Copy link
Contributor

cc @Aaronontheweb, the new dispatcherconfig stuff seems to have broken this

From Java docs:

PinnedDispatcher

This dispatcher dedicates a unique thread for each actor using it; i.e. each actor will have its own thread pool with only one thread in the pool.

  • Sharability: None
  • Mailboxes: Any, creates one per Actor
  • Use cases: Bulkheading
  • Driven by: Any akka.dispatch.ThreadPoolExecutorConfigurator
    by default a "thread-pool-executor

@Aaronontheweb
Copy link
Member

Yep, this is a case of me misunderstanding the details of how the pinned dispatcher works. I'll fix this and add some garbage collection to it also.

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