Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread Nick Coghlan
Antoine Pitrou wrote: Guido van Rossum guido at python.org writes: Will locks be interruptible with ^C? That is an oft-requested feature which also wasn't supported at that time; what's the situation nowadays? They still aren't interruptible. From what I can read it may be possible to

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread Jesse Noller
On Nov 18, 2009, at 5:38 AM, Nick Coghlan ncogh...@gmail.com wrote: Antoine Pitrou wrote: Guido van Rossum guido at python.org writes: Will locks be interruptible with ^C? That is an oft-requested feature which also wasn't supported at that time; what's the situation nowadays? They

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread Antoine Pitrou
Jesse Noller jnoller at gmail.com writes: Nick is right, many of the BSDs and FreeBSD up until fairly recently did not have named shared semaphore support. Still yet, the behavior is broken on some OSes such as OS X which you have to work around. The core locking support only uses

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread Jesse Noller
On Wed, Nov 18, 2009 at 8:50 AM, Antoine Pitrou solip...@pitrou.net wrote: Jesse Noller jnoller at gmail.com writes: Nick is right, many of the BSDs and FreeBSD up until fairly recently did not have named shared semaphore support. Still yet, the behavior is broken on some OSes such as OS X

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread David Bolen
Antoine Pitrou solip...@pitrou.net writes: I've submitted a patch (*) to add an optional timeout to locking operations (Lock.acquire() etc.). Since it's a pretty basic functionality, I would like to know if there was any good reason for not doing it. I always assumed it was because as a

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-18 Thread Antoine Pitrou
Hello, I've submitted a patch (*) to add an optional timeout to locking operations (Lock.acquire() etc.). Since it's a pretty basic functionality, I would like to know if there was any good reason for not doing it. I always assumed it was because as a least-common-denominator set of

[Python-Dev] Add an optional timeout to lock operations

2009-11-17 Thread Antoine Pitrou
Hello, I've submitted a patch (*) to add an optional timeout to locking operations (Lock.acquire() etc.). Since it's a pretty basic functionality, I would like to know if there was any good reason for not doing it. (*) http://bugs.python.org/issue7316 Thank you Antoine.

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-17 Thread Guido van Rossum
I think I can answer the why question: thread.c is *very* old code, in fact it predates the posix threads standard. When we (actually Sjoerd Mullender) wrote it, we had a number of OS-specific locking APIs to work with and the API was designed to fit all of them. I don't even recall the initial

Re: [Python-Dev] Add an optional timeout to lock operations

2009-11-17 Thread Antoine Pitrou
Guido van Rossum guido at python.org writes: I think the number of platforms has dwindled to two or three (Posix, Windows, and maybe one minority OS?), so now's the time to do it. (IOW I think the idea of the patch is fine.) Thanks. (the minority OS would be OS/2, I think) Will locks be