Implementing support for custom eviction actions in ActorPool as well as providing default Props for workers
This commit is contained in:
parent
972f4b538f
commit
913ef5d232
4 changed files with 43 additions and 45 deletions
|
|
@ -231,10 +231,10 @@ Examples
|
|||
def rampupRate = 0.1
|
||||
def partialFill = true
|
||||
def selectionCount = 1
|
||||
def instance = actorOf(new Actor {def receive = {case n:Int =>
|
||||
def instance(defaults: Props) = actorOf(defaults.withCreator(new Actor {def receive = {case n:Int =>
|
||||
Thread.sleep(n)
|
||||
counter.incrementAndGet
|
||||
latch.countDown()}})
|
||||
latch.countDown()}}))
|
||||
}
|
||||
|
||||
.. code-block:: scala
|
||||
|
|
@ -256,9 +256,9 @@ Examples
|
|||
def rampupRate = 0.1
|
||||
def backoffRate = 0.50
|
||||
def backoffThreshold = 0.50
|
||||
def instance = actorOf(new Actor {def receive = {case n:Int =>
|
||||
def instance(defaults: Props) = actorOf(defaults.withCreator(new Actor {def receive = {case n:Int =>
|
||||
Thread.sleep(n)
|
||||
latch.countDown()}})
|
||||
latch.countDown()}}))
|
||||
}
|
||||
|
||||
Taken from the unit test `spec <https://github.com/jboner/akka/blob/master/akka-actor/src/test/scala/akka/routing/RoutingSpec.scala>`_.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue