Closed
Description
Describe the bug
If you cancel a job with the client, it will keep running on the remote server.
I think the reason is that cancel
will only tell the thread that's pulling results off the queue that it should stop. It won't stop the thread that's connecting to the server.
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Reproduction
Run the cancel_events
demo (increase the sleep to 1 second so that you have time to cancel)
from gradio_client import Client
client = Client("http://127.0.0.1:7860")
job = client.submit(7, api_name="/fake_diffusion")
job.cancel()
You will see that the server keeps printing output in the console
Screenshot
Logs
No response
System Info
main
Severity
Blocking usage of gradio