Skip to content

Commit

Permalink
running cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jvo203 committed Mar 18, 2024
1 parent 3d1b237 commit 9e36021
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,19 @@ impl Handler<Disconnect> for SessionServer {
self.timer.schedule_with_delay(delay, move || {
// This closure is executed on the scheduler thread
println!("executing garbage collection for {}", &msg.dataset_id);

//check if there are no new active sessions
match datasets.read().get(&msg.dataset_id) {
Some(_) => {
println!("[garbage collection]: an active session has been found for {}, doing nothing", &msg.dataset_id);
},
None => {
println!("[garbage collection]: no active sessions found, {} will be expunged from memory", &msg.dataset_id);

let is_dummy = {
let tmp = DATASETS.read();
let fits = tmp.get(&msg.dataset_id);

match fits {
Some(lock) => {
let fits = lock.read();
Expand All @@ -419,7 +419,7 @@ impl Handler<Disconnect> for SessionServer {
}
}
};

//do not remove dummy datasets (loading progress etc)
//they will be cleaned in a separate garbage collection thread
if !is_dummy {
Expand Down

0 comments on commit 9e36021

Please sign in to comment.