I am trying to understand what exactly happens, when I call
val f = scala.concurrent.Future {... // my body function }
The code of object Future
defines apply
methods as follows:
def apply[T](body: =>T)(implicit execctx: ExecutionContext): Future[T] = impl.Future(body)
Unfortunately I do not see where the impl is defined in the code (and what it exactly does). My question is where the impl is defined.
impl is just a package from which Future object borrows implementation class.
Since Future object lives in the same concurrent
package it could address impl package effortlessly (no explicit imports required)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With