In this section, we will discuss the second component of the Scala Future API—Promise.
A Scala Promise is something similar to a Scala Future. Like a Scala Future, a Scala Promise may have a value or an exception. They have some minor differences in the actual functionality. Let's discuss them in the following sub-sections.