Repository navigation
#6464 Avoid crashing WaitForResult on a dangling promise - #6471
akleshchev wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-thread completion after coroutine teardown lacks regression coverage and needs human validation.
1 open issue
What changed in this PR
This PR addresses dangling promises when queued work outlives a waiting coroutine and stops chat-history processing during application errors.
Changes:
- Share promise ownership with queued callbacks for value and void results.
- Exit the chat-history manager loop when the application reports an error.
| File | Description |
|---|---|
| indra/newview/llchatservicehistory.cpp | Stops manager processing on application errors. |
| indra/llcommon/workqueue.h | Keeps promises alive through queued callback completion. |
Review effort: Balanced
|
I guess I will just not use waitForResult and poll instead. |
89cca37 to
137c66c
Compare
3a88718 to
6873909
Compare
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
Co-authored-by: akleshchev <117672381+akleshchev@users.noreply.github.com>
769a743 to
2f06e41
Compare

Looks like new chat service dies on a (planned) exception before the work it posted via runStorage completes.
I'm not sure if I should be changing WaitForResult to not crash or changing chat service to not block inside a finicky coroutine or both. Blocking is a poor choice for a service that does not control it's own lifetime.