Oh it's not supposed to *help*Wont help, at least much.
From quick, diagonal glance on a code it looks like most of stalling happens due to overcomplicated calculations aka "who shit when under which bushes, while walking three meters to the nearby shop for 17 hours". It all should be reduced in size/complexion/quantity, or calculate it all in steps, aka process npcs with id % 13 == 1 on the next player turn, than npcs with id % 13 == 2 and so on. There are wouldnt be a big difference anyway, since its a turn based game.
It just hides the problem by keeping the UI active while the game shits the bed so Windows doesn't think the program hung. But it won't do anything to prevent the hanging.
I'm not willing to put in any effort to fix this game unless I'm getting paid for it.