Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

concensus/miner: fix double read-lock of options #664

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

BurtonQin
Copy link
Contributor

options is parkingLot::RwLock.

https://docs.rs/parking_lot/latest/parking_lot/type.RwLock.html

Attempts to recursively acquire a read lock within a single thread may result in a deadlock.

The fix locks once and reuses the results.

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.

None yet

1 participant