code: def lock(self, function, argument):
          
          if self.testandset():
              function(argument)
          else:
              self.queue.append((function, argument))
docs: Lock a mutex, call the function with supplied argument
          when it is acquired.  If the mutex is already locked, place
          function and argument in the queue.