Hi Hbf, (which is a bit funny because I always read «Hauptbahnhof» :-) )
there are no guarantees, we only promise at-most-once messaging. That said, local message sends are hard to drop without killing the JVM in the process. But interrupting threads may result in undefined behavior (in particular the interrupt and/or the message may get lost, depending on the mailbox and dispatcher implementations). May I ask why you intend to interrupt Actor threads? Regards, Roland > 19 feb 2016 kl. 06:45 skrev hbf <[email protected]>: > > Hi everybody, > > If a thread gets interrupted during a actor.tell(msg, sender), is it > guaranteed that the message still gets sent? > > In my test case, the actor probe confirms that the message is indeed sent but > having read that there are minor differences between the dispatcher used for > tests and the "real" one, I'd like to confirm this. > > Thanks! > Hbf > > [ERROR] [02/18/2016 21:39:03.400] [Thread-3] > [akka://default/system/testProbe-2] interrupted during message send > java.lang.InterruptedException > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1245) > at > java.util.concurrent.locks.ReentrantLock.tryLock(ReentrantLock.java:442) > at > akka.testkit.CallingThreadDispatcher.runQueue(CallingThreadDispatcher.scala:275) > at > akka.testkit.CallingThreadDispatcher.dispatch(CallingThreadDispatcher.scala:208) > at akka.actor.dungeon.Dispatch$class.sendMessage(Dispatch.scala:132) > at akka.actor.ActorCell.sendMessage(ActorCell.scala:374) > at akka.actor.Cell$class.sendMessage(ActorCell.scala:295) > at akka.actor.ActorCell.sendMessage(ActorCell.scala:374) > at akka.actor.RepointableActorRef.$bang(RepointableActorRef.scala:169) > at akka.actor.ActorRef.tell(ActorRef.scala:128) > at org.foo.lambda$run$3(Bar.java:62) > at java.util.Optional.ifPresent(Optional.java:159) > at org.foo.run(Bar.java:57) > > > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/akka-user > <https://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Dr. Roland Kuhn Akka Tech Lead Typesafe <http://typesafe.com/> – Reactive apps on the JVM. twitter: @rolandkuhn <http://twitter.com/#!/rolandkuhn> -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
