add_event_detect crashs the whole interpreter
If you call RPi.GIPO.add_event_detect()
for a pin the interpreter crashes if you connect and disconnect to current of the heating circuit. RPi.GPIO.wait_for_edge()
does not have this problem.
A workaround would be an extra thread, blocking as long as the edge gets detected and sets a flag to get the main loop notified.