refactor: use a single Mutex in ProcState for module graph (#12489)

This commit factors out 4 different fields from "ProcState", that are behind
"Arc<Mutex<>>" into a single struct behind a single mutex.
This commit is contained in:
Bartek Iwańczuk 2021-10-19 16:01:46 +02:00 committed by GitHub
parent d77a4f1d43
commit f83c756aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 123 additions and 99 deletions

View file

@ -548,7 +548,7 @@ async fn cache_command(
Permissions::allow_all(),
)
.await?;
if let Some(graph_error) = ps.maybe_graph_error.lock().take() {
if let Some(graph_error) = ps.take_graph_error() {
return Err(graph_error.into());
}
}