Prevent deadlocks resulting from errors thrown before releasing mutex#195
Merged
Prevent deadlocks resulting from errors thrown before releasing mutex#195
Conversation
rekmarks
approved these changes
Jan 24, 2020
Member
rekmarks
left a comment
There was a problem hiding this comment.
LGTM.
This is a really important change.
A `try ... finally` block has been added to most places where a mutex is used, to ensure that any error thrown before the lock has been released will not result in a deadlock. The `finally` block will execute after the `try` block, but it will not interfere with any returned values or thrown errors (so long as nothing is thrown or returned within the `finally` block).
46620c2 to
62d385e
Compare
whymarrh
approved these changes
Jan 24, 2020
Member
|
whymarrh
pushed a commit
to whymarrh/gaba
that referenced
this pull request
Jan 24, 2020
…MetaMask#195) A `try ... finally` block has been added to most places where a mutex is used, to ensure that any error thrown before the lock has been released will not result in a deadlock. The `finally` block will execute after the `try` block, but it will not interfere with any returned values or thrown errors (so long as nothing is thrown or returned within the `finally` block).
Merged
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
…#195) A `try ... finally` block has been added to most places where a mutex is used, to ensure that any error thrown before the lock has been released will not result in a deadlock. The `finally` block will execute after the `try` block, but it will not interfere with any returned values or thrown errors (so long as nothing is thrown or returned within the `finally` block).
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
…#195) A `try ... finally` block has been added to most places where a mutex is used, to ensure that any error thrown before the lock has been released will not result in a deadlock. The `finally` block will execute after the `try` block, but it will not interfere with any returned values or thrown errors (so long as nothing is thrown or returned within the `finally` block).
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Bumps [@metamask/utils](https://github.com/MetaMask/utils) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/MetaMask/utils/releases) - [Changelog](https://github.com/MetaMask/utils/blob/main/CHANGELOG.md) - [Commits](MetaMask/utils@v3.4.1...v3.5.0) --- updated-dependencies: - dependency-name: "@metamask/utils" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A
try ... finallyblock has been added to most places where a mutex is used, to ensure that any error thrown before the lock has been released will not result in a deadlock.The
finallyblock will execute after thetryblock, but it will not interfere with any returned values or thrown errors (so long as nothing is thrown or returned within thefinallyblock).