How is locked used with an expression?

https://docs.elementscompiler.com/Oxygene/Members/Methods/#q=Locked

locked on Expression optionally provides an expression that will be used to synchronize the access.

How is locked used with an expression?
Please, some code example.

Thanks,

Best regards,
Jose A.

property foo; 
property bar; locked on foo; // would make sense for foo to be unchanging, ofc.

Ok. Thanks Marc.