Explicitly check event state after waiting.

In python2.6, the wait function always returns None, so explicitly
check the status of events after waiting with a timeout.

Change-Id: Ie354c1841c49725c93aa8ddf1c04f0e9a9b56548