[issue8777] Add threading.Barrier

2011-05-26 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue8777] Add threading.Barrier

2010-10-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed as revision 85878 -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue8777] Add threading.Barrier

2010-10-28 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me now, I think you can commit it. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue8777] Add threading.Barrier

2010-10-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Right. I've provided more text for the return value and provided an example. I´ve changed all three to properties, the locking wasn't really required for waiting(). I added some extra tests for the properties. -- Added file: http://bugs.python.

[issue8777] Add threading.Barrier

2010-10-28 Thread Georg Brandl
Georg Brandl added the comment: Two comments: * The return value of wait() isn't documented well. What is the significance of the returned index, i.e. what does distinguish it from a randomly selected one in range(parties)? * get_parties() and is_broken() should be properties (waiting, brok

[issue8777] Add threading.Barrier

2010-10-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Here is an updated patch. It contains documentation. ReStructured isn't my Forte, and I don't know how to verify that it is correct, so please review it for me. -- dependencies: +Add a return value to threading.Condition.wait() Added file: htt

[issue8777] Add threading.Barrier

2010-10-27 Thread Georg Brandl
Georg Brandl added the comment: Well, that change would be fine by me, it was just not explained anywhere in the patch. So if it's going to be documented (with versionchanged etc.), just leave it in. -- ___ Python tracker

[issue8777] Add threading.Barrier

2010-10-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Right. The condition object change is necessary to have timeout work. I can remove that feature, and slate it for another day. Add a separate patch for a Condition.wait() return value. All of the other apis are able to let the caller know whether

[issue8777] Add threading.Barrier

2010-10-27 Thread Georg Brandl
Georg Brandl added the comment: The tests pass for me, and the patch looks good except for a stray change to Condition objects. -- ___ Python tracker ___ ___

[issue8777] Add threading.Barrier

2010-10-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue8777] Add threading.Barrier

2010-10-26 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Okay, here is a new submission. I've redesigned it to be more reminiscent of the Java version, by allowing the barrier to have a "Broken" state and raising a BrokenBarrierError. I've also redesigned the mechanism from a simple perpetually increasing ind

[issue8777] Add threading.Barrier

2010-10-24 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hi, I had forgotten about this. I went back to the drawing board and had almost completed a new version. Looking at the Java barrier shows how one can go overboard with stuff. My though with the barrier is to provide a simple synchronization primitiv

[issue8777] Add threading.Barrier

2010-10-23 Thread Georg Brandl
Georg Brandl added the comment: Ping -- is this something you want in 3.2, Kristjan? -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue8777] Add threading.Barrier

2010-05-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I'll provide a new version shortly, targeted for the py3k branch. -- ___ Python tracker ___

[issue8777] Add threading.Barrier

2010-05-24 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8777] Add threading.Barrier

2010-05-24 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: You should probably mention that pthread_barrier and java.util.concurrent.CyclicBarrier are prior art for this. I'm thinking about them when looking at the API to see whether your differences make sense. "enter" seems to be the wrong term for this, since the

[issue8777] Add threading.Barrier

2010-05-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +jyasskin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8777] Add threading.Barrier

2010-05-20 Thread Brian Curtin
Changes by Brian Curtin : -- versions: +Python 3.2 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue8777] Add threading.Barrier

2010-05-20 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : The "barrier" synchronization primitive is often very useful. It is simpler to use than an Event, for example, when waiting for threads to start up, or to finish. The patch contains a simple barrier implementation based on a Condition variable, for