What happens when a Scala "Future" is garbage collected?

Viewed 931

Say I have a Stream that's rather expensive to compute. I can easily create a thread that "computes ahead" just by writing something like

import scala.actors.Futures._
val s = future { stream.size }

If I then throw away the reference to this Future, will that thread be killed off by the garbage collector?

1 Answers
Related