Ensure with_fx correctly joins internal thread before continuing