public void executeBlockingTask(BlockingTask task) throws InterruptedException { enterSleep(); try { currentBlockingTask = task; pollThreadEvents(); task.run(); } finally { exitSleep(); currentBlockingTask = null; pollThreadEvents(); } }
public void afterBlockingCall() { exitSleep(); pollThreadEvents(); }