Await the "completed" state of an Awaitable
.
Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext is prepared to properly manage the blocking.
ready's docs:
Await and return the result (of type T
) of an Awaitable
.
Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext to properly detect blocking and ensure that there are no deadlocks.
Looking at the docs alone, it seems to me that `ready`'s difference is that it will "ensure that there are no deadlocks."
Can you please explain further the difference between the two? Why would I pick one over the other?
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the explanations, Rex and Viktor.Per your response, Viktor, under what circumstances would you choose ready over result, and vice-versa?
On Tuesday, November 22, 2016 at 1:16:03 PM UTC-5, Kevin Meredith wrote:scala.concurrent.Await's docs (http://www.scala-lang.org/api/2.11.8/#scala.concurrent.Await$) show 2 functions: await and ready.await's docs:Await the "completed" state of an
Awaitable
.Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext is prepared to properly manage the blocking.
ready's docs:
Await and return the result (of type
T
) of anAwaitable
.Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext to properly detect blocking and ensure that there are no deadlocks.
Looking at the docs alone, it seems to me that `ready`'s difference is that it will "ensure that there are no deadlocks."
Can you please explain further the difference between the two? Why would I pick one over the other?
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--