skip biased semaphore
This commit is contained in:
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user