Lock/Unlock issue
It seems that this is actually about a database query that puts the Fiber into a waiting state specifically, query("UNLOCK").
In that case, everything should work correctly.
Although there are some dangerous edge cases. The database might be under high load, causing the query("UNLOCK") request to wait for too long, leading to a timeout. This would trigger another exception, which could then be interpreted as a complete failure.
Putting a Fiber into a waiting state inside a finally block does not contradict the shutdown mode. However, the programmer must be careful inside finally section because if a second exception occurs, it means the code cannot properly complete execution.
--
Ed.