Following code will release lock.
lock(locker) { return 5; }
For a detailed explanation, this SO answer is recommended.