Skip to content

Commit

Permalink
misc(backend): fix reborrowing Pin<&mut T> as described in the doc ht…
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuntowicz committed Dec 5, 2024
1 parent 049f4ac commit f0cd474
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backends/trtllm/src/looper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ fn executor_status_looper(
}

if backend.num_tokens_ready() > 0 {
match backend.pin_mut().pull_tokens() {
let mut backend = backend.pin_mut();
match backend.as_mut().pull_tokens() {
Ok(responses) => {
// Iterate through all the decoded token
for step in responses.deref() {
Expand All @@ -139,7 +140,7 @@ fn executor_status_looper(
if let Err(_) = ctx.streamer.send(response) {
// Client has dropped, remove from tracked requests
debug!("Client dropped - removing request {} from tracked requests", step.request_id);
backend.pin_mut().cancel(step.request_id);
backend.as_mut().cancel(step.request_id);
let _ = in_flights.remove(&step.request_id);
}
} else {
Expand Down

0 comments on commit f0cd474

Please sign in to comment.