From 834e7ca088b5f417235327cd290b42459c733594 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 4 Nov 2021 17:18:57 -0400 Subject: SL-16202: Use large WorkQueue size limits for mainloop and General. Give ThreadPool and WorkQueue the ability to override default ThreadSafeSchedule capacity. Instantiate "mainloop" WorkQueue and "General" ThreadPool with very large capacity because we never want to have to block trying to push to either. --- indra/newview/llappviewer.cpp | 4 +++- indra/newview/llstartup.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ea2e3a4007..02b4dd57f1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -367,7 +367,9 @@ BOOL gLogoutInProgress = FALSE; BOOL gSimulateMemLeak = FALSE; -WorkQueue gMainloopWork("mainloop"); +// We don't want anyone, especially threads working on the graphics pipeline, +// to have to block due to this WorkQueue being full. +WorkQueue gMainloopWork("mainloop", 1024*1024); //////////////////////////////////////////////////////////// // Internal globals... that should be removed. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 13e7fcb6e4..9a4149948c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -313,7 +313,9 @@ void launchThreadPool() << size << " threads" << LL_ENDL; // Use a function-static ThreadPool: static duration, but instantiated // only on demand. - static LL::ThreadPool pool("General", size); + // We don't want anyone, especially the main thread, to have to block + // due to this ThreadPool being full. + static LL::ThreadPool pool("General", size, 1024*1024); } void update_texture_fetch() -- cgit v1.2.3