ctrl-c during channel "emit" makes scan to exit without proper cleanup
Example demonstrating the problem:
MANU [28]: ftimescan.run()
Acquisiton = 0.1 sec
Period = 0.1003 sec
NPoints = 100
Scan mode = TIME
Camera mode = SINGLE
Start delay = 1.000 sec
Total Time = 11.030 sec
Scan 12 Tue Aug 24 14:01:52 2021 manu user = blissadm
ftimescan 0.1 100 0
Preparing ...
Running ...
^C!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
Stopping ...
!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
!!! === KeyboardInterrupt: === !!! ( for more details type cmd 'last_error' )
Finished (took 0:00:02.894002)
!!! === ScanAbort: === !!! ( for more details type cmd 'last_error' )
MANU [28]: bcu_mpx_tpxatl25.acquisition.status
Out [28]: 'Running'
Edited by Matias Guijarro