While reviewing #20 where a wait_for currently times out after a minute, I noticed that hitting control-c didn't do anything. Well it did work eventually after the timeout happened.
Waiting for Subscriber...
^C^C^C^C^C^C^C^C^C^C^C^CTraceback (most recent call last):
File "publisher.py", line 20, in <module>
writer.wait_for(StatusKind.PUBLICATION_MATCHED, timedelta(seconds=60))
File ".../pyopendds/pyopendds/DataWriter.py", line 26, in wait_for
return datareader_wait_for(self, status, *normalize_time_duration(timeout))
File ".../pyopendds/pyopendds/exceptions.py", line 34, in check
@classmethod
KeyboardInterrupt
I'd have to research this more, but it looks like what ever signal handler CPython has doesn't interrupt native extension code. This makes sense because it has to handle it by making a KeyboardInterrupt in Python, but is annoying since it's different from how a C++ OpenDDS application would behave. The correct solution probably involves avoiding OpenDDS's implementation of wait_for and creating an implementation in Python.
While reviewing #20 where a
wait_forcurrently times out after a minute, I noticed that hitting control-c didn't do anything. Well it did work eventually after the timeout happened.I'd have to research this more, but it looks like what ever signal handler CPython has doesn't interrupt native extension code. This makes sense because it has to handle it by making a
KeyboardInterruptin Python, but is annoying since it's different from how a C++ OpenDDS application would behave. The correct solution probably involves avoiding OpenDDS's implementation ofwait_forand creating an implementation in Python.