Skip to content

Commit 87461b4

Browse files
committed
allocator will decide budgeting
1 parent dbbf838 commit 87461b4

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

pulsebeam/src/participant/downstream/audio.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,7 @@ impl AudioAllocator {
6565
return Poll::Pending;
6666
}
6767

68-
let mut budget = 10;
6968
loop {
70-
if budget == 0 {
71-
// Force a wake so we return immediately after the runtime
72-
// polls other tasks (like Video).
73-
cx.waker().wake_by_ref();
74-
return Poll::Pending;
75-
}
76-
budget -= 1;
77-
7869
let (track_id, packet) = match self.inputs.poll_next_unpin(cx) {
7970
Poll::Ready(Some(val)) => val,
8071
Poll::Ready(None) => return Poll::Ready(None), // All inputs closed

pulsebeam/src/participant/downstream/video.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -354,17 +354,7 @@ impl Slot {
354354
}
355355

356356
fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<RtpPacket>> {
357-
// Process a limited number of iterations to ensure fairness
358-
let mut budget = 10;
359-
360357
loop {
361-
if budget == 0 {
362-
// yield now, let others run first.
363-
cx.waker().wake_by_ref();
364-
return Poll::Pending;
365-
}
366-
budget -= 1;
367-
368358
if let Some(pkt) = self.switcher.pop() {
369359
return Poll::Ready(Some(pkt));
370360
}

0 commit comments

Comments
 (0)