You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to Bug #9830, which in fact derives from this. This is the code
import scala.concurrent._
import ExecutionContext.Implicits.global
val f: Future[Int] = Future {
val source = scala.io.Source.fromChars(("x" * 7000000).toArray)
source.toSeq.indexOfSlice("teetotal")
}
Per the referenced bug, the stuff inside the Future {...} never completes, so of course the future never returns; typing 'f' in the REPL brings up this:
res0: scala.concurrent.Future[Int] = List()
because it's unfinished. What's odd is if you type 'f' a few more times, it returns the same "I'm not finished" result ever more slowly, and after ~15 seconds it stops returning anything at all.
IOW it seems the thread that spawns the future is hanging. The computing thread is taking up near 100% of cpu but not all of it (rest of my machine is fairly responsive) so the spawning thread has enough cpu to reply to my entering 'f', but it locks up.
Should this happen?
The text was updated successfully, but these errors were encountered:
This is related to Bug #9830, which in fact derives from this. This is the code
import scala.concurrent._
import ExecutionContext.Implicits.global
val f: Future[Int] = Future {
val source = scala.io.Source.fromChars(("x" * 7000000).toArray)
source.toSeq.indexOfSlice("teetotal")
}
Per the referenced bug, the stuff inside the Future {...} never completes, so of course the future never returns; typing 'f' in the REPL brings up this:
res0: scala.concurrent.Future[Int] = List()
because it's unfinished. What's odd is if you type 'f' a few more times, it returns the same "I'm not finished" result ever more slowly, and after ~15 seconds it stops returning anything at all.
IOW it seems the thread that spawns the future is hanging. The computing thread is taking up near 100% of cpu but not all of it (rest of my machine is fairly responsive) so the spawning thread has enough cpu to reply to my entering 'f', but it locks up.
Should this happen?
The text was updated successfully, but these errors were encountered: