I have this situation:
method a: an implicit ec is created
method a: calls another method in a Future, i.e
Future(anotherMethod).anotherMethod, and all its subsequent calls no longer have the ec from method a in scope.
Example code:
class Foo {
private implicit val ec: ExecutionContextExecutor =
ExecutionContext.fromExecutor(Executors.newFixedThreadPool(Runtime.getRuntime.availableProcessors()))
private val anotherClass = new Bar()
def methodA() = Future(anotherClass.anotherMethod())
}
I'm guessing, that any calls to .par, e.g someVector.par.map.().seq etc, from anotherMethod or any of its subsequent calls, will use the global execution context and not the custom one created in method a. Is my assumption correct?