On Wednesday, May 4, 2016 at 8:14:10 AM UTC-6, Johan Andrén wrote:
>
>
> Note that all mutable state should go in the GraphStageLogic, as the 
> GraphStage is a blueprint that you can create once and materialize multiple 
> time.
>

Excellent catch! Thank you.
 

On Wednesday, May 4, 2016 at 8:22:47 AM UTC-6, √ wrote:
>
> And, the Async Callback is not executed concurrently with the GraphStage 
> so no need for the AtomicBoolean, no?
>

 The submit method is called outside of the graphStage context, so it seems 
to be needed. My goal was to not schedule more async callbacks than 
necessary. :)


On Wednesday, May 4, 2016 at 8:27:46 AM UTC-6, drewhk wrote:
>
> ah, there is a buffer.isEmpty check before.
>

Yes, and even though the buffer could be changed outside of the GraphStage 
single-threaded context guarantee, it only increases in size. So, if size 
is 1 when it checks, it'll be >=1 by the time poll is called.

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to