Ive done this before when filling up on long highway drives.
In the diesels, I dont think twice... Id leave the engine idling to let the turbo cool down, might as well get other things going.
With gassers, I generally just run gently a bit extra, then turn the car off. If the gasser is a turbo, like my saab, Ill pull the gas cap and put my fuel additive in with the engine running... Still, in the name of wasting fuel at idle, since it takes longer than 30 seconds to fill up, I do turn the engine off eventually...