I'm a scala beginner and need to understand the following syntax. The structure of code is
// val context = ...
// val future = Future {...} (context)
I don't understand what this means.
val context = ExecutionContext.fromExecutorService(...)
val future = Future {
breakable {
while (true) {
try {
handle(something)
}
catch {
case _: InterruptedException =>
}
}
}
} (context) // what does this syntanx mean? Future {...} (val)
what is this (context) after right curly brace???