title: Proper way to check the value of completed Promise?
body: <p>Context: I have a function where I'd like to check in the beginning that a certain Promise has a) already been completed and b) has a certain value.</p>
  
  <p>There is a method to check whether the Promise in Scala (as of 2.11.5) has already been completed, namely <code>isCompleted</code>. However, when you want to get a value of the already completed Promise, it looks like you have to write an unappetising chain like this:</p>
  
  <pre><code>val p = Promise[Boolean]
  val result = p.future.value.get.toOption.get
  </code></pre>
  
  <p>(for completeness: I was thinking about writing something like:</p>
  
  <pre><code>if (p.isCompleted &amp;&amp; p.future.value.get.toOption.get == true)
  </code></pre>
  
  <p>but was appalled at the ugliness of that code :) )</p>
  
  <p>Is there no better way? Or is it a sign that I am not using it the way it was intended to be used?</p>