added morn76 changes to jthread