Hi, 

by default, on which kind of Thread is a future executed ?

Example: 

when i run the following program


object ThreadAPP extends App {

  import scala.concurrent.ExecutionContext.Implicits.global

  val future = Future {

    println("done with the future"); "hello"

  }

  future foreach println

  //Thread.sleep(5000)

}


As you can see with the Thread.sleep commanted. or let say no await, the 
println is empty and the program terminate.


however with The sleep or an await, my main does not terminate. 


Hence, i wonder what is happening behind the scene. The Main thread in Java 
is supposed to be a daemon thread. (1) *Is the future executed in a Deamon 
thread ? *

(2) Can an executorService manager both daemon (the main thread) and 
non-deamon (futures) at once? or the executorService of ....Implicit.global 
only create thread for whatever asynchronous code will come with future ?

If someone could explain a little how Implicit.global works that would 
help. 





-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to