Thread.sleep and scala.concurrent.blocking

204 views
Skip to first unread message

Carl Pulley

unread,
Jul 8, 2016, 12:13:26 PM7/8/16
to scalatest-users
(cross posted to the scalatest gitter channel)

I've noticed that when async or future testing using eventually or whenReady, the underlying code is blocking (because it ultimately calls Thread.sleep).

Are there any specific reasons that these blocking usages of Thread.sleep have not been wrapped in the scala.concurrent.blocking method?

Many thanks,

  Carl.

Bill Venners

unread,
Jul 8, 2016, 1:12:37 PM7/8/16
to scalate...@googlegroups.com
Hi Carl,

Eventually probably predated the addition of Futures into Scala, but
that said I was unaware of the blocking method or what it does. I will
investigate, but if you want to explain what it does here, please do.

Thanks.

Bill
> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest
> ---
> You received this message because you are subscribed to the Google Groups
> "scalatest-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scalatest-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Bill Venners
Artima, Inc.
http://www.artima.com

Carl Pulley

unread,
Jul 10, 2016, 1:15:30 PM7/10/16
to scalatest-users
Hi Bill,

Hope that helps,

  Carl.
Reply all
Reply to author
Forward
0 new messages