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 for issue #55: ThreadMonitor waits unnecessarily #56

Merged
merged 1 commit into from
May 4, 2018
Merged

Fix for issue #55: ThreadMonitor waits unnecessarily #56

merged 1 commit into from
May 4, 2018

Conversation

cmorriss
Copy link

This change provides a fix and test for issue #55:
#55

In ThreadMonitor in the call to wait on the monitor object. It's
possible that the threadToMonitor was already set and the monitor
notification sent. In that case, the monitor wait goes to the
maximum value for the cpu time limit.

The fix is to first verify that the threadToMonitor is null within
the synchronized block and before the wait on the monitor.

This change provides a fix and test for issue #55:
#55

In ThreadMonitor in the call to wait on the monitor object. It's
possible that the threadToMonitor was already set and the monitor
notification sent. In that case, the monitor wait goes to the
maximum value for the cpu time limit.

The fix is to first verify that the threadToMonitor is null within
the synchronized block and before the wait on the monitor.
@mxro
Copy link
Collaborator

mxro commented May 4, 2018

Sorry for the delay! Looks all perfect, thank you!

@mxro mxro merged commit 493e0eb into javadelight:master May 4, 2018
mxro pushed a commit that referenced this pull request May 4, 2018
tangrammer added a commit to tangrammer/delight-nashorn-sandbox that referenced this pull request May 9, 2018
mxro added a commit that referenced this pull request May 10, 2018
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.

2 participants