A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/303712.html below:

Metaclasses, decorators, and synchronization

Metaclasses, decorators, and synchronizationMichael Ekstrand mekstran at scl.ameslab.gov
Sun Sep 25 23:46:21 EDT 2005
On Sunday 25 September 2005 22:30, Victor Ng wrote:
> You could do it with a metaclass, but I think that's probably
> overkill.

OK. And thanks for the example :-). It looks simple enough... I didn't 
think the solution would be overly complex. And the RLock makes it 
easier than I anticipated - was RLock not in existance when Synch.py 
from the old Python metaclass tutorial/demo was written?

> It's not really efficient as it's doing test/set of an RLock all the
> time, but hey - you didn't ask for efficient.  :)

Hmm... efficient is good. I was planning to do something with some kind 
of lock, but I'm fairly new to multithreaded programming. What would be 
a more efficient way to accomplish this?

- Michael

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4