'Release the token.
Should be called by whoever did the L{acquire}() when the shared
resource is free.'

def release(self):

    assert (self.tokens < self.limit), 'Someone    released    me    too    many    times:    too    many    tokens!'
    self.tokens = (self.tokens + 1)
    if self.waiting:
        self.tokens = (self.tokens - 1)
        d = self.waiting.pop(0)
        d.callback(self)
