Skip to content

fix issue #19: deadlock#20

Merged
mitchellwrosen merged 1 commit intomainfrom
fix-19
Jan 25, 2023
Merged

fix issue #19: deadlock#20
mitchellwrosen merged 1 commit intomainfrom
fix-19

Conversation

@mitchellwrosen
Copy link
Copy Markdown
Member

a deadlock could occur if a child, after beginning to tear down via a ScopeClosing exception delivered from its parent, ultimately wants to die with a different exception (e.g. a synchronous exception thrown during a registered cleanup action).

this PR makes a child thread that has an exception to propagate to its parent first check to see if its parent's scope is closed, and if it is, elects to communicate the exception via childExceptionVar rather than use throwTo

a deadlock could occur if a child, after beginning to tear down via a
`ScopeClosing` exception delivered from its parent, ultimately wants to
die with a different exception (e.g. a synchronous exception thrown
during a registered cleanup action).

this PR makes a child thread that has an exception to propagate to its
parent first check to see if its parent's scope is closed, and if it is,
elects to communicate the exception via `childExceptionVar` rather than
use `throwTo`
@mitchellwrosen mitchellwrosen merged commit efbccde into main Jan 25, 2023
@mitchellwrosen mitchellwrosen deleted the fix-19 branch January 25, 2023 18:58
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