Ah … but then it only works if you propagate the EC either implicitly (when using Futures), or if you use the same EC to execute all of the tasks (without shifting to other ones).

Wouldn’t probably work for me, as I usually just use the global EC everywhere and delegate to specialised ECs for DB, network or other blocking operations.

So in a single call-chain multiple unrealted ECs might be used. On the good side, there’s no implicit ec: ExecutionContext everywhere ;)

Software engineer, Functional Programming and Scala enthusiast, SoftwareMill co-founder

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store