#5994 Fix llprocess waiting too long on kill#6019
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces main-thread stalls and redundant termination work when an LLProcess is being killed/cleaned up, which should address the reported extra delays when media processes are terminated.
Changes:
- Add a
mKillCalledflag to avoid repeating termination work in~LLProcess()after an explicitkill(). - Reduce/avoid blocking waits on Windows by using
GetExitCodeProcess()instead ofWaitForSingleObject(..., 100)intick()and shortening the destructor wait. - Adjust
kill()to mark the process as “kill requested” and return success once the kill signal/request is issued (without waiting for state transition).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| indra/llcommon/llprocess.h | Adds mKillCalled state to track explicit kill requests. |
| indra/llcommon/llprocess.cpp | Removes/shortens blocking waits on Windows; uses mKillCalled to skip redundant destructor termination after kill(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c22248b to
1884f5e
Compare
|
@copilot, please add a unit test into llprocess_test.cpp that unsures tick() takes no more than an ms and a similar test for destruction. |
Added two regression tests in commit
Both thresholds (75 ms) are well below the old 100 ms blocking wait, providing a clear regression guard while remaining robust on loaded CI systems. |
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
Noticed some extra delays when media was being killed.