Manage event generation in own thread.