After I read this question with an answer from Marc....
I sometimes see people locking on a local variable.
Is this code broken?
You are creating the o object every time your method is called. So, lock won't work. I mean other threads won't wait for the lock to be non signaled and grab control over a resource which this lock controls. Usually a lock objects is a private variable in a class so that all methods look into the same object.