mirror of
https://github.com/CAG2Mark/SuperUserBot.git
synced 2024-11-10 12:34:00 +01:00
15 lines
405 B
Python
15 lines
405 B
Python
|
def datawrite(func):
|
||
|
def wrapper(self, *args, **kwargs):
|
||
|
result = func(self, *args, **kwargs)
|
||
|
self.export()
|
||
|
return result
|
||
|
return wrapper
|
||
|
|
||
|
def mutex(*args_, **kwargs_):
|
||
|
def w1(func):
|
||
|
def wrapper(self, *args, **kwargs):
|
||
|
with kwargs_["lock"]:
|
||
|
val = func(self, *args, **kwargs)
|
||
|
return val
|
||
|
return wrapper
|
||
|
return w1
|