-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded concurrency framework to support panic=unwind mode (#16)
We are going to use era-consensus code in zksync-era, which doesn't have panic=abort enabled for the time being. This PR adjust the concurrency framework so that it behaves in the expected way in the presence of panics: * scope::run/run_blocking will wait for all tasks to either complete OR panic * scope's context gets cancelled immediately if any of the tasks returns an error OR panics * scope::run/run_blocking will panic if any of the scope's tasks panicked (but only after all tasks complete or panic). This also means that even if task A returns an error before task B panics, the whole scope will panic anyway (A's error will be ignored). * the root task of the scope::run/run_blocking call will NOT be executed in the same tokio task as the run call any more (so that a panic in the root task won't prevent scope call from awaiting for completion of all tasks).
- Loading branch information
Showing
9 changed files
with
322 additions
and
154 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.