good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit edb1937c authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub
Browse files

core: improve shutdown synchronization in BlockChain (#22853)


This change removes misuses of sync.WaitGroup in BlockChain. Before this change,
block insertion modified the WaitGroup counter in order to ensure that Stop would wait
for pending operations to complete. This was racy and could even lead to crashes
if Stop was called at an unfortunate time. The issue is resolved by adding a specialized
'closable' mutex, which prevents chain modifications after stopping while also
synchronizing writers with each other.

Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
parent 4e599ee4
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment