mirror of
https://github.com/CAG2Mark/SuperUserBot.git
synced 2024-11-14 06:23:48 +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
|