Added internal support for waiting for signal event.