reverting a failed attempt to optimize native thread attach/detach