Lorenzo Barasti
15MWE December 2016
An Execution Context is an abstraction that lets us schedule and run tasks in a predictable way
FixedThreadPool
SingleThreadExecutor
WorkStealingPool
ExecutionContext.global
reuses a fixed number of threads operating off a shared unbounded queue
creates new threads as needed, but will reuse previously constructed threads when they are available
CPU bound operations characterise tasks where we focus on computations - e.g. processing data
IO bound operations characterise tasks where we are waiting for data to be sent in or out of our process - e.g. http communication, DB reading/writing
Let's settle it with some very unscientific...
Demo Time!