Like the author of [this question](https://stackoverflow.com/questions/13381134/what-are-use-cases-of-scala-promise) I'm trying to understand the reasoning for user-visible promises in Scala 2.10's futures and promises.

Particularly, going again to the [example from the SIP](http://docs.scala-lang.org/sips/pending/futures-promises.html), isn't it completely flawed:

```
import scala.concurrent.{ future, promise }
val p = promise[T]
val f = p.future
val producer = future {
  val r = produceSomething()
  p success r
  continueDoingSomethingUnrelated()
}
val consumer = future {
  startDoingSomething()
  f onSuccess {
    case r => doSomethingWithResult()
  }
}

```

I am imagining the case where the call to `produceSomething` results in a runtime exception. Because promise and producer-future are completely detached, this means the system hangs and the consumer will never complete with either success or failure.

So the only safe way to use promises requires something like

```
val producer = future {
  try {
    val r.produceSomething()
    p success r
  } catch {
     case e: Throwable =>
       p failure e
       throw e  // ouch
  }
  continueDoingSomethingUnrelated()
}

```

Which obviously error-prone and verbose.

The only case I can see for a visible promise type—where `future {}` is insufficient—is the one of the callback hook in M. A. D.'s answer. But the example of the SIP doesn't make sense to me.