I don't really understand what you are saying by "really blocked", since the application must continue to handle events to be un-blocked.
The only thing you have to do is a loop with a sleep, waiting a specific event. If the app s blocked, nothing will un-block it, it must wait for a signal or something, no ?