Deadlocks along the way and the most logic way is to introduce AgsThreadHangcheck to target the problem in a peformant and intuitive way.
May be the need for RX/TX gate control? By having validation of the gates state. And it could intercept in case.