Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait_for is Holding Up SIGINT #22

Open
iguessthislldo opened this issue Jun 7, 2021 · 1 comment
Open

wait_for is Holding Up SIGINT #22

iguessthislldo opened this issue Jun 7, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@iguessthislldo
Copy link
Member

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.

@iguessthislldo iguessthislldo added the bug Something isn't working label Jun 7, 2021
@iguessthislldo iguessthislldo added the good first issue Good for newcomers label Aug 24, 2021
@iguessthislldo
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant