The Python Way
Gustavo Cordova
gcordova at hebmex.com
Wed Mar 27 16:00:08 EST 2002
More information about the Python-list mailing list
Wed Mar 27 16:00:08 EST 2002
- Previous message (by thread): The Python Way
- Next message (by thread): The Python Way
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Thinking of automatic locking concepts, has there been a PEP for > synchronized objects like Java? > > class Snorf: > def __init__(self): > self.lock = lock.lock() > > def doSomething(self,x) synchronize(self.lock): > code > > It would be nice if the synchronize parameter could be an instance, > class or module lock. Hmmm... I believe this would be easy to do using metaclasses, but since I'm no meta-wizard, I'll leave it to one of the great bots to illuminate us with a simple proof of concept. -gustavo
- Previous message (by thread): The Python Way
- Next message (by thread): The Python Way
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list