Added support for Locks
Added test_locks tests, to test the asynchronous locks.