'@param tokens: initial value of L{tokens} and L{limit}
@type tokens: L{int}'

def __init__(self, tokens):

    _ConcurrencyPrimitive.__init__(self)
    if (tokens < 1):
        raise ValueError('DeferredSemaphore    requires    tokens    >=    1')
    self.tokens = tokens
    self.limit = tokens
