Automatic continue on filament runout

For single extruder prints, is it possible for the second extruder to take over when filament runs out on first extruder ?

This would require extensive changes in the firmware.