Do not allocate memory on heap in new thread.

It seems that doing it would cause misterious crash on Windows, this is
only a workaround and we should find the root cause in future.
Reset the event after signaled.