06-04-2019, 03:51 AM
Have in mind that this is an emergency fix so you have time to find where the problem really is. Do *NOT* leave it running like this. Adding critical sections like that in multithreaded applications can lead to unpredictable side effects, the worse is a deadlock which would require you to restart your application.