Hi Jonas,

Alla is not involved in that execution path.
Use Akka Dispatcher for the EC to the future iso the global pool.

-- 
Cheers,
√
On 15 Jun 2015 16:55, "Jonas K" <thejo...@gmail.com> wrote:

> I have an actor that calls code that returns a Future using an
> ExecutionContext
> different from the one used by the actor, as shown below.
>
> class BadActor extends Actor with ActorLogging {
>
>   def receive = {
>
>     case BadActor.Initialize =>
>
>       log.info("Received Initialize")
>
>       SomethingAsync.doIt
>
>   }
>
> }
>
>
> object SomethingAsync {
>
>   import scala.concurrent.ExecutionContext.Implicits.global
>
>
>
>   def doIt: Future[Int] = Future {
>
>     throw new OutOfMemoryError()
>
>     5
>
>   }
>
> }
>
>
> If the code throws an Error, the stacktrace is printed out, but the jvm
> does not
> exit, though akka.jvm-exit-on-fatal-error = on.
> If I pass in the Actor's dispatcher as an ExecutionContext to the failing
> code,
> the jvm exits as desired.
>
> Should I always use the Actor's ExecutionContext in any code that it
> calls? How do
> I handle 3rd party libraries that manage their own ExecutionContexts
> internally
>  (eg. Slick)?
>
>
> Thanks for any advice,
>
>
> _jonas
>
> --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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