Merge pull request #976 from akka/wip-2856-pinned-keep-alive-patriknw
Allow allow-core-timeout=off conf of PinnedDispatcher, see #2856
This commit is contained in:
commit
0dda2ad361
3 changed files with 15 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ class PinnedDispatcher(
|
|||
Int.MaxValue,
|
||||
Duration.Zero,
|
||||
_mailboxType,
|
||||
_threadPoolConfig.copy(allowCorePoolTimeout = true, corePoolSize = 1, maxPoolSize = 1),
|
||||
_threadPoolConfig.copy(corePoolSize = 1, maxPoolSize = 1),
|
||||
_shutdownTimeout) {
|
||||
|
||||
@volatile
|
||||
|
|
|
|||
|
|
@ -123,6 +123,15 @@ And then using it:
|
|||
|
||||
.. includecode:: ../java/code/docs/dispatcher/DispatcherDocTestBase.java#defining-pinned-dispatcher
|
||||
|
||||
Note that ``thread-pool-executor`` configuration as per the above ``my-thread-pool-dispatcher`` example is
|
||||
NOT applicable. This is because every actor will have its own thread pool when using ``PinnedDispatcher``,
|
||||
and that pool will have only one thread.
|
||||
|
||||
Note that it's not guaranteed that the *same* thread is used over time, since the core pool timeout
|
||||
is used for ``PinnedDispatcher`` to keep resource usage down in case of idle actors. To use the same
|
||||
thread all the time you need to add ``thread-pool-executor.allow-core-timeout=off`` to the
|
||||
configuration of the ``PinnedDispatcher``.
|
||||
|
||||
Mailboxes
|
||||
---------
|
||||
|
||||
|
|
|
|||
|
|
@ -129,6 +129,11 @@ Note that ``thread-pool-executor`` configuration as per the above ``my-thread-po
|
|||
NOT applicable. This is because every actor will have its own thread pool when using ``PinnedDispatcher``,
|
||||
and that pool will have only one thread.
|
||||
|
||||
Note that it's not guaranteed that the *same* thread is used over time, since the core pool timeout
|
||||
is used for ``PinnedDispatcher`` to keep resource usage down in case of idle actors. To use the same
|
||||
thread all the time you need to add ``thread-pool-executor.allow-core-timeout=off`` to the
|
||||
configuration of the ``PinnedDispatcher``.
|
||||
|
||||
Mailboxes
|
||||
---------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue