<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/threadpool.h, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2025-04-10T21:13:19Z</updated>
<entry>
<title>Give control over thread queue's automatic shutdown</title>
<updated>2025-04-10T21:13:19Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-10-31T00:30:54Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9117a37c3d1bd9741e599b60fdf000f9f174f72a'/>
<id>urn:sha1:9117a37c3d1bd9741e599b60fdf000f9f174f72a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix pre-commit error</title>
<updated>2025-04-10T05:00:43Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2025-04-10T05:00:43Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=3f648945b000bef1f793034efacded25cf15cca2'/>
<id>urn:sha1:3f648945b000bef1f793034efacded25cf15cca2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SL-18721 Window shutdown adjustments</title>
<updated>2024-04-17T19:55:05Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-04-16T20:25:01Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=21947778baaca205615a71a97ac8f563c998fdd3'/>
<id>urn:sha1:21947778baaca205615a71a97ac8f563c998fdd3</id>
<content type='text'>
On viewer shutdown
1. Instead of handling potential WM_* messages viewer is no longer
equiped to handle drop window's pointer and expect only WM_DESTROY
2. Detach thread and let it do its own thing, thread will delete itself
3. Reverts commit 1161262029f9619fb02d81575382b64d82d9cd09

Reason for the change: window was closing too early (as son as "LLApp"
status changes) without proper cleanup
</content>
</entry>
<entry>
<title>SL-18721 Restore release behavior</title>
<updated>2024-03-15T17:44:38Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-03-14T22:04:19Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1161262029f9619fb02d81575382b64d82d9cd09'/>
<id>urn:sha1:1161262029f9619fb02d81575382b64d82d9cd09</id>
<content type='text'>
Closing window correctly caused a significant amount of logout freezes
with no known reproes. Temporarily returning to old behavior were thread
was killes without closing window and will reenable in later maints to
hopefully get a scenario or at least more data of what is causing the
freeze.
</content>
</entry>
<entry>
<title>SL-18721 Shutdown fixes #4</title>
<updated>2024-02-07T23:34:39Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-02-07T20:50:28Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=2e5b105dffc41695d0a64c5b55eef7c28da49246'/>
<id>urn:sha1:2e5b105dffc41695d0a64c5b55eef7c28da49246</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SL-18721 Shutdown fixes</title>
<updated>2024-01-22T16:47:43Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-01-20T00:26:51Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=4a34a1196627c7e9998edde725d5e839f3ef61b9'/>
<id>urn:sha1:4a34a1196627c7e9998edde725d5e839f3ef61b9</id>
<content type='text'>
1. After window closes viewer still takes some time to shut down, so
added splash screen to not confuse users (and to see if something gets
stuck)
2. Having two identical mWindowHandle caused confusion for me, so I
split them. It looks like there might have been issues with thread being
stuck because thread's handle wasn't cleaned up.
3. Made region clean mCacheMap immediately instead of spending time
making copies on shutdown
</content>
</entry>
<entry>
<title>SL-18809: Add WorkSchedule; remove timestamps from WorkQueue.</title>
<updated>2022-12-09T18:21:45Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-12-09T18:21:45Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=fc424a0db90fd2d2e44e85a19750ad6eaa57b28a'/>
<id>urn:sha1:fc424a0db90fd2d2e44e85a19750ad6eaa57b28a</id>
<content type='text'>
For work queues that don't need timestamped tasks, eliminate the overhead of a
priority queue ordered by timestamp. Timestamped task support moves to
WorkSchedule. WorkQueue is a simpler queue that just waits for work.

Both WorkQueue and WorkSchedule can be accessed via new WorkQueueBase API. Of
course the WorkQueueBase API doesn't deal with timestamps, but a WorkSchedule
can be accessed directly to post timestamped tasks and then handled normally
(e.g. by ThreadPool) to run them.

Most ThreadPool functionality migrates to new ThreadPoolBase class, with
template subclass ThreadPoolUsing&lt;WorkQueue&gt; or ThreadPoolUsing&lt;WorkSchedule&gt;
depending on need. ThreadPool is now an alias for ThreadPoolUsing&lt;WorkQueue&gt;.
Importantly, ThreadPoolUsing::getQueue() delivers a reference to the specific
queue subclass type, so you can post timestamped tasks on a queue retrieved
from ThreadPoolUsing&lt;WorkSchedule&gt;::getQueue().

Since ThreadPool is no longer a simple class but an alias for a particular
template specialization, introduce threadpool_fwd.h to forward-declare it.

Recast workqueue_test.cpp to exercise WorkSchedule, since some of the tests
are time-based. A future todo would be to exercise each applicable test with
both WorkQueue and WorkSchedule.
</content>
</entry>
<entry>
<title>SL-17483: Make it possible to override width of any ThreadPool.</title>
<updated>2022-06-09T14:18:29Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-06-09T14:18:29Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=ac99e979f43d49402a24b2f58a154c4ef1583efd'/>
<id>urn:sha1:ac99e979f43d49402a24b2f58a154c4ef1583efd</id>
<content type='text'>
Introduce CommonControl, which in a running viewer (or any program containing
an LLViewerControlListener instance) gives access to LLViewerControl
functionality, e.g. getting, setting or enumerating control variables --
without introducing a link dependency on newview.

Make ThreadPool's constructor consult CommonControl to check for an override
for the width of the new ThreadPool in the Global (i.e. gSavedSettings)
setting ThreadPoolSizes, and honor that if found.

Introduce static ThreadPool methods getConfiguredWidth(), to query for such an
override on any particular ThreadPool name; and getWidth(), to ask for the
width of an instance if that instance already exists, else the width with
which it *would* be instantiated.
</content>
</entry>
<entry>
<title>SL-17483: Make ThreadPool inherit LLInstanceTracker</title>
<updated>2022-06-09T13:54:39Z</updated>
<author>
<name>Cosmic Linden</name>
<email>cosmic@lindenlab.com</email>
</author>
<published>2022-05-31T19:49:53Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=ef87eb7fa80a72b94d67d5ab680f60a837dd1ddd'/>
<id>urn:sha1:ef87eb7fa80a72b94d67d5ab680f60a837dd1ddd</id>
<content type='text'>
(cherry picked from commit 41d6a0e222241606c317281e2f0b211e16813dd5)
</content>
</entry>
<entry>
<title>SL-16400: Add ThreadPool::start() method, and call it.</title>
<updated>2021-11-24T01:39:32Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2021-11-24T01:39:32Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=2b96f89c2a374d72c0a8bc28a7b06ad4db7eae6e'/>
<id>urn:sha1:2b96f89c2a374d72c0a8bc28a7b06ad4db7eae6e</id>
<content type='text'>
It's sometimes important to finish other initialization before launching the
threads in the ThreadPool, so make that an explicit step. In particular, we
were launching the LLImageGL texture thread before initializing the GL
context, resulting in all gray textures.
</content>
</entry>
</feed>
