Skip to content

Commit

Permalink
fix: no semaphore
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
  • Loading branch information
brooksmtownsend committed Nov 21, 2024
1 parent 1b53f4b commit 9a11208
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/host/src/wasmbus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1255,9 +1255,9 @@ impl Host {
)
// .instrument(debug_span!("serve_wrpc_manual_whatever"))
.await?;
let permits = Arc::new(Semaphore::new(
usize::from(max_instances).min(Semaphore::MAX_PERMITS),
));
// let permits = Arc::new(Semaphore::new(
// usize::from(max_instances).min(Semaphore::MAX_PERMITS),
// ));
let metrics = Arc::clone(&self.metrics);
Ok(Arc::new(Component {
component,
Expand All @@ -1266,22 +1266,22 @@ impl Host {
exports: spawn(
async move {
let mut exports = stream::select_all(exports);
let permits = Arc::clone(&permits);
// let permits = Arc::clone(&permits);
loop {
let permits = Arc::clone(&permits);
// let permits = Arc::clone(&permits);
if let Some(fut) =
exports.next().instrument(debug_span!("aaaaa_export")).await
{
match fut {
Ok(fut) => {
debug!("accepted invocation, acquiring permit");
let permit = permits
.acquire_owned()
.instrument(debug_span!("acquire_semaphore"))
.await;
// let permit = permits
// .acquire_owned()
// .instrument(debug_span!("acquire_semaphore"))
// .await;
spawn(
async move {
let _permit = permit;
// let _permit = permit;
debug!("handling invocation");
match fut
.instrument(debug_span!("aaaaa_awaiting_fut"))
Expand Down

0 comments on commit 9a11208

Please sign in to comment.