mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fixed Synchronized to allow synchronization of methods not defined in the current class.
This commit is contained in:
parent
4b0600a91a
commit
cbf154b4ff
@ -75,7 +75,12 @@ class Synchronized(type):
|
||||
self._Synchronized_rlock.release()
|
||||
return changeFunctionName(g, f.func_name, f.__doc__)
|
||||
for attr in dict['__synchronized__']:
|
||||
if attr in dict:
|
||||
dict[attr] = synchronized(dict[attr])
|
||||
else:
|
||||
def f(self, *args, **kwargs):
|
||||
getattr(super(newclass, self), attr)(args, kwargs)
|
||||
dict[attr] = synchronized(changeFunctionName(f, attr))
|
||||
original__init__ = dict.get('__init__')
|
||||
def __init__(self, *args, **kwargs):
|
||||
if not hasattr(self, '_Synchronized_rlock'):
|
||||
|
Loading…
Reference in New Issue
Block a user