First of all, your problem is difficult to fulfill, because we do not know what is happening in your application. We also do not know which code in your application hangs.
For others, the problem in your application is not clear. Thus, having this rather poorly defined problem, hardly anyone can help.
To fix the problem, you can do the following:
- , . , .
- , , , .
- , , . , , .
, , , .