Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Improve handling of daemon thread termination when terminating the debugee #140

Merged
merged 2 commits into from
Feb 28, 2018
Merged

Improve handling of daemon thread termination when terminating the debugee #140

merged 2 commits into from
Feb 28, 2018

Conversation

DonJayamanne
Copy link
Contributor

Fixes #139
Two solutions here:

  • Use set_exit to notify the ptvsd.Client if it needs to exit (by initializing the __exit flag)
  • Wait for daemon threads to finish (100ms is assumed enough time)

ptvsd/wrapper.py Outdated
def exit_handler(proc, server_thread):
proc.close()
if server_thread.is_alive():
server_thread.join(0.1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's increase this to something like a second - 100ms is just too easy to hit under load.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants