mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-05-07 18:32:06 +00:00
misc(backend): fix reborrowing Pin<&mut T> as described in the doc https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.as_mut
This commit is contained in:
parent
049f4acd5b
commit
f0cd4742c2
@ -113,7 +113,8 @@ fn executor_status_looper(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if backend.num_tokens_ready() > 0 {
|
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) => {
|
Ok(responses) => {
|
||||||
// Iterate through all the decoded token
|
// Iterate through all the decoded token
|
||||||
for step in responses.deref() {
|
for step in responses.deref() {
|
||||||
@ -139,7 +140,7 @@ fn executor_status_looper(
|
|||||||
if let Err(_) = ctx.streamer.send(response) {
|
if let Err(_) = ctx.streamer.send(response) {
|
||||||
// Client has dropped, remove from tracked requests
|
// Client has dropped, remove from tracked requests
|
||||||
debug!("Client dropped - removing request {} from tracked requests", step.request_id);
|
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);
|
let _ = in_flights.remove(&step.request_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user