Lockblocked until the resource is available
TryEnter will not do anything if it is already locked.
Depending on your needs, you should use one or the other.
In your case, f2()he will always do what he does, no matter how long it takes. f1()will return immediately if there is a lock conflict