$ 0 0 It seems to work if I remove the Lock() and Unlock() calls from the above code, but I'm not sure if it's safe to leave it like that.