support new method to set thread callback