Hi Martin, I’m hesitant to do this since this method is not “safe” from a message ordering standpoint: if the unstashed message ends up being re-stashed (due to faulty logic) then it will go from the head to the tail of the stash. It does seem like an “expert feature” to me.
The context I considered this is (very recently) is Akka Typed: I have not yet figured out how or even if to provide this feature. The only difference between The Stash and a normal linear buffer within the actor itself is that the former is retained across a restart while the latter is not. Since the Actor obviously was faulty (otherwise there would be no restart), how much can we trust the stash? If the stashing and the function of the Actor are not related, then we can easily express these two in separate Actors, with the stash being the parent of the real recipient. Regards, Roland > 5 feb 2015 kl. 16:29 skrev Martin Krasser <[email protected]>: > > Hi, > > does anything speak against making unstash() > <https://github.com/akka/akka/blob/v2.3.9/akka-actor/src/main/scala/akka/actor/Stash.scala#L186> > public (currently private[akka])? In my use case, it would help me to avoid > redundantly moving messages between the stash and the actor mailbox using > stash()/unstashAll(). > > Thanks, > Martin > > -- > Martin Krasser > > blog: http://krasserm.github.io <http://krasserm.github.io/> > code: http://github.com/krasserm <http://github.com/krasserm> > twitter: http://twitter.com/mrt1nz <http://twitter.com/mrt1nz> > > -- > >>>>>>>>>> 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 http://groups.google.com/group/akka-user > <http://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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
