thread2 hack to implement fit_timeout