How to synchronize all methods in class python3?
21:07 28 Apr 2019

I have a python 3 class.

I want to synchronize all methods, only one method can be execute at same time, even works in multi thread.

What is the best way to implement?

@synchronized
class Library(object):

    def __init__(self):
        pass

    def method1(self):
        pass

    def method2(self):
        pass
python-3.x