mutual exclusion seems to work well!

This commit is contained in:
Brandon Thomas committed 2021-06-08 00:47:41 -04:00
1 parent 373726b685
commit 9ce83025b4
2 files changed
+4 -2

No files matched your search

@@ -138,6 +138,8 @@ FOR UPDATE
info!("Can acquire lock??? {}", can_transact);
if !can_transact {
info!("returning");
transaction.rollback().await?;
return Ok(false);
}
+2 -2
View File
@@ -223,7 +223,7 @@ async fn main_loop(inferencer: Inferencer) {
if jobs.is_empty() {
info!("No jobs!");
std::thread::sleep(Duration::from_millis(1500));
std::thread::sleep(Duration::from_millis(20));
continue;
}
@@ -241,7 +241,7 @@ async fn main_loop(inferencer: Inferencer) {
timeout_millis = START_TIMEOUT_MILLIS; // reset
std::thread::sleep(Duration::from_millis(500));
std::thread::sleep(Duration::from_millis(20));
}
}