The previous version was a session level lock, which would prevent any other connection from writing events after it had ran. Also the previous version was using try, of which the return value needs to be checked. This method will pause until the lock is available in the same way that lock table does.
The previous version was a session level lock, which would prevent any other connection from writing events after it had ran. Also the previous version was using
try
, of which the return value needs to be checked. This method will pause until the lock is available in the same way thatlock table
does.