Re: question about mutex.py

2006-01-08 Thread Peter Hansen
[EMAIL PROTECTED] wrote: yes, I read it, and I even know about threading's existence. I just thought that if something claims to be atomic, it better should be. I think the term atomic is meaningful only when the context is known. For example, atomic operations in the Python interpreter are

Re: question about mutex.py

2006-01-08 Thread Bengt Richter
On Sun, 08 Jan 2006 10:24:43 -0500, Peter Hansen [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: yes, I read it, and I even know about threading's existence. I just thought that if something claims to be atomic, it better should be. I think the term atomic is meaningful only when the context

Re: question about mutex.py

2006-01-08 Thread Peter Hansen
Bengt Richter wrote: Atomic means trademarked by a company that used to use that name in the 50's to describe and identify a line toys it put in its breakfast cereal boxes. The rights are now owned by an IP scavenging company which is trying to sell them for stock in another IP scavenger with

Re: question about mutex.py

2006-01-07 Thread Kent Johnson
Jean-Paul Calderone wrote: Did you read the module docstring? Of course, no multi-threading is implied -- hence the funny interface for lock, where a function is called once the lock is aquired. If you are looking for a mutex suitable for multithreaded use, see the threading

question about mutex.py

2006-01-06 Thread m_palmer45
Hi, I was looking at the code in the standard lib's mutex.py, which is used for queuing function calls. Here is how it lets you acquire a lock: def testandset(self): Atomic test-and-set -- grab the lock if it is not set, return True if it succeeded. if not

Re: question about mutex.py

2006-01-06 Thread Jean-Paul Calderone
On 6 Jan 2006 14:44:39 -0800, [EMAIL PROTECTED] wrote: Hi, I was looking at the code in the standard lib's mutex.py, which is used for queuing function calls. Here is how it lets you acquire a lock: Did you read the module docstring? Of course, no multi-threading is implied -- hence the

Re: question about mutex.py

2006-01-06 Thread m_palmer45
yes, I read it, and I even know about threading's existence. I just thought that if something claims to be atomic, it better should be. -- http://mail.python.org/mailman/listinfo/python-list