Skip to content

Commit

Permalink
Drop global state before sleeping the thread
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Jun 25, 2023
1 parent d147f1f commit 077165c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/driver/src/drivers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ define_driver!(
}
}

// Drop the mutex lock on the global state so that other drivers may access it
// while this thread sleeps.
drop(global_state);

// Check again in 5 minutes.
tracing::debug!(target: "fault-game-watcher", "Done checking for updates. Sleeping for 5 minutes...");
tokio::time::sleep(Duration::from_secs(60 * 5)).await;
Expand Down

0 comments on commit 077165c

Please sign in to comment.