Locks or stops the flow if already locked.
In-pins
Out-pins
Tries to claim a lock and returns if it was successful or not
Sets a lock or waits until the lock has been released.