Added the ErrorHandler notifications to all try-catch blocks
This commit is contained in:
parent
2127e8077e
commit
c4e2d73668
17 changed files with 162 additions and 56 deletions
|
|
@ -9,7 +9,8 @@ import java.util.concurrent._
|
|||
import atomic.{AtomicLong, AtomicInteger}
|
||||
import ThreadPoolExecutor.CallerRunsPolicy
|
||||
|
||||
import akka.util. {Duration}
|
||||
import akka.util.Duration
|
||||
import akka.actor.{ErrorHandler, ErrorHandlerEvent}
|
||||
|
||||
object ThreadPoolConfig {
|
||||
type Bounds = Int
|
||||
|
|
@ -207,8 +208,10 @@ class BoundedExecutorDecorator(val executor: ExecutorService, bound: Int) extend
|
|||
})
|
||||
} catch {
|
||||
case e: RejectedExecutionException =>
|
||||
ErrorHandler notifyListeners ErrorHandlerEvent(e, this)
|
||||
semaphore.release
|
||||
case e =>
|
||||
ErrorHandler notifyListeners ErrorHandlerEvent(e, this)
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue