Or t5-pub-sub should do a copy-on-write, rather than copying it for
each iteration. I miss Clojure collections!

On Thu, Dec 15, 2011 at 3:37 AM, Jochen Berger <foober...@googlemail.com> wrote:
> Hi again,
>
> I think I was wrong with the term "race condition". After some investigation
> I found out what causes the problem. I created a simple demo application
> that I can upload I you want me to.
> Basically, the problem occurs, when there are multiple subscribers for the
> same topic and one of them changes the subscriptions (e.g. by unsubscribing)
> for the topic while the publisher function runs. That will lead to the
> listener cache being cleared and publisher.listeners being undefined upon
> the next iteration of the for loop.
> I think this could be fixed by iterating over a clone of publisher.listeners
> instead of publisher.listeners itself. Of course that would mean that if one
> listener unsubscribes other listeners while running, those would be notified
> for the current run anyway.
> Any thoughts on that?
>
>
> Jochen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to