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