Futures in Scala 2.12 (part 6): Missing utilities: unit & never
Read OriginalThis technical blog post, part of a series on Scala 2.12 Futures, discusses the absence and utility of two specific methods: Future.unit and Future.never. It explains how Future.unit acts as a cached zero/default instance, and how Future.never provides a memory-leak-safe representation of a Future that never completes, including code examples and scenarios where they are beneficial.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser