diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-05-08 12:07:31 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-05-08 12:07:31 -0400 |
commit | 026ef1935dbdb21ab79159d38fb78e126dd6ac95 (patch) | |
tree | 1c5ff4626cc50a0a57cc27df534f0ad5d196bc83 /indra/llwindow | |
parent | 6d0d9b8e549c2bc600e6bf416d4614edc55e35c0 (diff) |
SL-19690: Follow up on Rye Mutt's fix for shutdown crashes.
Rather than continuing to propagate try/catch (Closed)
(aka LLThreadSafeQueueInterrupt) constructs through the code base, make
WorkQueueBase::post() return bool indicating success (i.e. ! isClosed()).
This obviates postIfOpen(), which no one was using anyway.
In effect, postIfOpen() is renamed post(), bypassing the exception when
isClosed().
Review existing try/catch blocks of that sort, changing to test for post()
returning false.
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 43bef5ff68..c5a6a3fa8f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -370,15 +370,10 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool template <typename CALLABLE> void post(CALLABLE&& func) { - try - { - getQueue().post(std::forward<CALLABLE>(func)); - } - catch (const LLThreadSafeQueueInterrupt&) - { - // Shutdown timing is tricky. The main thread can end up trying - // to post a cursor position after having closed the WorkQueue. - } + // Ignore bool return. Shutdown timing is tricky: the main thread can + // end up trying to post a cursor position after having closed the + // WorkQueue. + getQueue().post(std::forward<CALLABLE>(func)); } /** |