Hacker News new | ask | show | jobs
by mzl 4907 days ago
While the Future abstraction in Scala is very nice, it is unfortunately not very good in a multi-threaded context. The implementation of Futures contains a lock that, IIRC, locks the outermost object they are contained in. For us, this led to lots of serialization of code that should and could run in parallel. We've unforunately had to remove all our use of Futures until the implementation matches the expected behaviour.
1 comments

TIL. I was under the impression that they all ran (more or less) in parellel.
Depends on where and how they are created, but in our case lots of heavy futures were created in the same object. YMMV.