Viktor Klang 5/26/2017

Futures in Scala Protips (part 3): Unapplying Future.apply (sometimes)

Read Original

This technical blog post, part of a series on Scala Futures, details a performance optimization. It explains that using Future.apply to wrap an already-known value needlessly starts an asynchronous computation. The article recommends using Future.successful, Future.failed, or Future.fromTry instead for better efficiency when the result is immediately available.

Futures in Scala Protips (part 3): Unapplying Future.apply (sometimes)

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes