Move chil engine to the new thread api