'Test that an appropriate exception is raised when attempting
to use deferUntilLocked concurrently.'

def test_concurrentUsage(self):

    self.lock.lock()
    self.clock.callLater(1, self.lock.unlock)
    d = self.lock.deferUntilLocked()
    d2 = self.lock.deferUntilLocked()
    self.assertFailure(d2, defer.AlreadyTryingToLockError)
    self.clock.advance(1)
    return d
