def __init__(self, key, scheduler, context = 'default'):
        """
        Create a lock object. You do not need to share this object with other routines;
        all locks with the same *key* and *context* are mutual exclusive.
        
        :param key: Any hashable value.
        
        :param scheduler: The scheduler
        
        :param context: An extra object to separate keys into different context
        """
        self.key = key
        self.context = context
        self.scheduler = scheduler
        self.locked = False
        self.lockroutine = None
def __init__ ( self , key , scheduler , context = 'default' ) : self . key = key self . context = context self . scheduler = scheduler self . locked = False self . lockroutine = None
Create a lock object. You do not need to share this object with other routines;
        all locks with the same *key* and *context* are mutual exclusive.
        
        :param key: Any hashable value.
        
        :param scheduler: The scheduler
        
        :param context: An extra object to separate keys into different context