Changing mailbox-capacity to be unbounded for the case where the bounds are 0, as per the docs in the config

This commit is contained in:
Viktor Klang 2011-04-05 12:06:27 +02:00
parent 5be70e8c64
commit 71a32c719a
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@ abstract class MessageDispatcherConfigurator {
def mailboxType(config: Configuration): MailboxType = {
val capacity = config.getInt("mailbox-capacity", Dispatchers.MAILBOX_CAPACITY)
// FIXME how do we read in isBlocking for mailbox? Now set to 'false'.
if (capacity < 0) UnboundedMailbox()
if (capacity < 1) UnboundedMailbox()
else BoundedMailbox(false, capacity, Duration(config.getInt("mailbox-push-timeout-time", Dispatchers.MAILBOX_PUSH_TIME_OUT.toMillis.toInt), TIME_UNIT))
}