Moving data processing to a new thread