4 ms·
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
by mzl 14y 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.
- reddit_clone 14y agoTIL. I was under the impression that they all ran (more or less) in parellel.
- mzl 14y agoDepends on where and how they are created, but in our case lots of heavy futures were created in the same object. YMMV.