Hi Adam, PushPull stage callbacks are never concurrent. Also, if a stage calls ctx.Push then it will receive eventually an onPull, and whenever it calls ctx.pull, it will receive an onPush eventually (of course completion events can come at any time).
I'm wondering if there are any guarantees on the order of calling onPush() > and onPull()? For example, that onPush() won't be called twice in > succession, but that onPush() and onPull calls are interleaved? Otherwise > we may end up not duplicating elements (since we only remember the last > one). > You can imagine a series of stages like a pipe and a bouncing ball. When receiving onPush() the ball just bounced into that segment of the pipe. If you call ctx.push as a response to this, then the ball just continues downwards. If you call ctx.pull, then it will bounce back upwards. There is only one "ball" (unless you use DetachedOps but they are an advanced concept). Currently there is no exposed API to fuse multiple operations into such a synchronous pipeline so all stages will run in a separate actor, but that does not change their behavior (a single stage in an actor is actually three stages, two boundary ones that talk to the actor, and your stage sandwiched in-between) so the above mental model works. These stages are completely unbuffered and there is only one activated stage at a given time (in a given synchronous island). > > I guess this depends if there is any buffering around a custom > push-pull-stage, but I would expect it to have a default buffer of awaiting > elements? > There is never an implicit buffer there, unless you put your own explicit buffering stage. -Endre > > Adam > > -- > >>>>>>>>>> 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. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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.
