Temporary fix for the throughput benchmark
This commit is contained in:
parent
d14e524485
commit
66dd0123bc
4 changed files with 54 additions and 64 deletions
|
|
@ -269,22 +269,3 @@ trait ExecutorServiceDelegate extends ExecutorService {
|
|||
|
||||
def invokeAny[T](callables: Collection[_ <: Callable[T]], l: Long, timeUnit: TimeUnit) = executor.invokeAny(callables, l, timeUnit)
|
||||
}
|
||||
|
||||
/**
|
||||
* An ExecutorService that only creates the underlying Executor if any of the methods of the ExecutorService are called
|
||||
*/
|
||||
trait LazyExecutorService extends ExecutorServiceDelegate {
|
||||
|
||||
def createExecutor: ExecutorService
|
||||
|
||||
lazy val executor = {
|
||||
createExecutor
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A concrete implementation of LazyExecutorService (Scala API)
|
||||
*/
|
||||
class LazyExecutorServiceWrapper(executorFactory: ⇒ ExecutorService) extends LazyExecutorService {
|
||||
def createExecutor = executorFactory
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue