Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/InternLM/lmdeploy
/ cancel
Method
cancel
lmdeploy/pytorch/engine/engine_loop.py:596–601 ·
view source on GitHub ↗
Cancel all loops.
(self)
Source
from the content-addressed store, hash-verified
594
self.cancel()
595
596
def
cancel(self):
597
""
"Cancel all loops."
""
598
for
task in self.tasks:
599
if
not task.done():
600
task.cancel()
601
self.tasks.clear()
602
603
604
def
build_engine_loop(engine:
'Engine'
):
Callers
15
stop
Method · 0.95
_cancel_all_tasks
Method · 0.45
async_cancel
Method · 0.45
async_stream_infer
Method · 0.45
stop
Method · 0.45
lifespan_handler
Function · 0.45
stop_metrics_handler
Method · 0.45
wait_for_async_tasks
Function · 0.45
cancel_async_tasks
Function · 0.45
wait_tasks
Method · 0.45
stop_loop
Method · 0.45
close
Method · 0.45
Calls
2
done
Method · 0.80
clear
Method · 0.45
Tested by
7
event_loop
Function · 0.36
async_main
Method · 0.36
_async_test_mp_async_end_waits_for_stream_init_after_cancel
Function · 0.36
_async_test_ray_stream_startup_cancel_drops_remote_stream
Function · 0.36
_async_test_ray_stream_cancel_after_start_drops_remote_stream
Function · 0.36
event_loop
Function · 0.36
_run_api_wrapper_cleanup_after_cancel
Function · 0.36