process events when gui thread is blocked