Skip to content

Commit

Permalink
Add comment for drop
Browse files Browse the repository at this point in the history
  • Loading branch information
leonqadirie committed Dec 12, 2023
1 parent 94259de commit ec7c015
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ractor/src/pg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub fn leave_scoped(scope: ScopeName, group: GroupName, actors: Vec<ActorCell>)
if let Some(mut groups_in_scope) = monitor.index.get_mut(&scope) {
groups_in_scope.retain(|group_name| group_name != &group);
if groups_in_scope.is_empty() {
// drop the `RefMut` to prevent a `DashMap` deadlock
drop(groups_in_scope);
monitor.index.remove(&scope);
}
Expand Down

0 comments on commit ec7c015

Please sign in to comment.