Fixed bug with restarting supervised supervisor that had done linking in constructor + Changed all calls to EventHandler to use direct 'error' and 'warning' methods for improved performance
This commit is contained in:
parent
9e3e3efd33
commit
299f865156
16 changed files with 134 additions and 84 deletions
|
|
@ -10,7 +10,7 @@ import atomic.{AtomicLong, AtomicInteger}
|
|||
import ThreadPoolExecutor.CallerRunsPolicy
|
||||
|
||||
import akka.util.Duration
|
||||
import akka.actor.{EventHandler}
|
||||
import akka.actor.EventHandler
|
||||
|
||||
object ThreadPoolConfig {
|
||||
type Bounds = Int
|
||||
|
|
@ -208,10 +208,10 @@ class BoundedExecutorDecorator(val executor: ExecutorService, bound: Int) extend
|
|||
})
|
||||
} catch {
|
||||
case e: RejectedExecutionException =>
|
||||
EventHandler notify EventHandler.Warning(this, e.toString)
|
||||
EventHandler.warning(this, e.toString)
|
||||
semaphore.release
|
||||
case e: Throwable =>
|
||||
EventHandler notify EventHandler.Error(e, this)
|
||||
EventHandler.error(e, this, e.getMessage)
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue