'Attempt to acquire the lock.  Returns a L{Deferred} that fires on
lock acquisition with the L{DeferredLock} as the value.  If the lock
is locked, then the Deferred is placed at the end of a waiting list.
@return: a L{Deferred} which fires on lock acquisition.
@rtype: a L{Deferred}'

def acquire(self):

    d = Deferred(canceller=self._cancelAcquire)
    if self.locked:
        self.waiting.append(d)
    else:
        self.locked = True
        d.callback(self)
    return d
