fixed syntax errors
added unit test for DLock#lockWhile