Heating or cooling the stream of extruded material