skip biased semaphore

This commit is contained in:
Bryan Stitt 2023-11-21 23:53:16 -04:00
parent 77fab86a11
commit 4fe4dab385

@ -551,16 +551,18 @@ impl App {
})
.await;
let semaphore_permit = tokio::select! {
biased;
let semaphore_permit = semaphore.acquire_owned().await?;
p = semaphore.acquire_owned() => {
p
}
p = self.bonus_ip_concurrency.clone().acquire_owned() => {
p
}
}?;
// let semaphore_permit = tokio::select! {
// biased;
// p = semaphore.acquire_owned() => {
// p
// }
// p = self.bonus_ip_concurrency.clone().acquire_owned() => {
// p
// }
// }?;
Ok(Some(semaphore_permit))
} else {
@ -590,19 +592,21 @@ impl App {
})
.await;
let semaphore_permit = tokio::select! {
biased;
let semaphore_permit = semaphore.acquire_owned().await?;
p = semaphore.acquire_owned() => {
p
}
p = self.bonus_user_concurrency.clone().acquire_owned() => {
p
}
p = self.bonus_ip_concurrency.clone().acquire_owned() => {
p
}
}?;
// let semaphore_permit = tokio::select! {
// biased;
// p = semaphore.acquire_owned() => {
// p
// }
// p = self.bonus_user_concurrency.clone().acquire_owned() => {
// p
// }
// p = self.bonus_ip_concurrency.clone().acquire_owned() => {
// p
// }
// }?;
Ok(Some(semaphore_permit))
} else {