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

Fix UnboundLocalError (subprocess died before reader threads started). #49

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

jsiirola
Copy link
Contributor

Summary/Motivation:

This resolves an exception that is due to a timing error where a subprocess can die before the I/O reader thread is launched. The cleanup routines need to verify that the threads were created before joining them.

The original error was reported on the Pyomo Forum

Changes proposed in this PR:

  • verify that the reader thread was created before closing it

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

This resolves an exception that is due to a timing error where a
subprocess can die before the O/I reader threads are launched.  The
cleanup routines need to verify that the threads were created before
joining them.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0009%) to 63.973% when pulling 85b13d0 on subprocess_th_fix into 89086c2 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0009%) to 63.973% when pulling 85b13d0 on subprocess_th_fix into 89086c2 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0009%) to 63.973% when pulling 85b13d0 on subprocess_th_fix into 89086c2 on master.

@coveralls
Copy link

coveralls commented Jan 16, 2019

Coverage Status

Coverage increased (+0.01%) to 63.985% when pulling 85b13d0 on subprocess_th_fix into 89086c2 on master.

@jsiirola jsiirola merged commit fe7a4b0 into master Jan 16, 2019
@jsiirola jsiirola deleted the subprocess_th_fix branch April 23, 2019 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants