<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/lleventcoro.cpp, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://www.megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://www.megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/'/>
<updated>2026-01-24T16:42:55Z</updated>
<entry>
<title>#5046 Fix a long freeze when fetching inventory</title>
<updated>2026-01-24T16:42:55Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>117672381+akleshchev@users.noreply.github.com</email>
</author>
<published>2026-01-23T20:51:27Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=e42ec63bfd7ada1087a00ca3ccc39c95679b7fab'/>
<id>urn:sha1:e42ec63bfd7ada1087a00ca3ccc39c95679b7fab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed</title>
<updated>2024-04-29T04:56:09Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-04-29T04:43:28Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SL-15393: Use non-overloaded name for function returning LLSD&amp;.</title>
<updated>2021-06-23T23:07:40Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2021-06-11T21:06:50Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=a9b82b9d89aa3d0460d142fc520bc6a8ba79574e'/>
<id>urn:sha1:a9b82b9d89aa3d0460d142fc520bc6a8ba79574e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-476, SL-13512: Fix flawed fix for former failure.</title>
<updated>2020-06-26T18:40:07Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2020-06-26T18:40:07Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=75b5f72e6951cae855a6abacc110a886e0ae701c'/>
<id>urn:sha1:75b5f72e6951cae855a6abacc110a886e0ae701c</id>
<content type='text'>
Specifically, llcoro::suspendUntilTimeout() is definitely called concurrently
by multiple coroutines. New code that instantiates a local LLEventStream must
allow the name to be tweaked for uniqueness.
</content>
</entry>
<entry>
<title>DRTVWR-476, SL-13512: Make suspendUntilTimeout() notice shutdown.</title>
<updated>2020-06-26T00:59:04Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2020-06-26T00:59:04Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=1231cb4585290a26e29cca221f7c81fda3e2c623'/>
<id>urn:sha1:1231cb4585290a26e29cca221f7c81fda3e2c623</id>
<content type='text'>
Specifically, the shutdown crash reported in SL-13512 was due to
LLExperienceCache::idleCoro() looping on suspendUntilTimeout(), failing to
notice in its slumbers that the viewer was shutting down around it.

Make suspendUntilTimeout() internally call suspendUntilEventOnWithTimeout(),
which already listens for "LLApp" state-change events and throws Stopping when
LLApp enters its shutdown sequence.
</content>
</entry>
<entry>
<title>DRTVWR-476, SL-12197: Don't throw Stopping from main coroutine.</title>
<updated>2020-03-25T23:24:25Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-11-22T16:58:27Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=2a56ab44360aa49bd0df9281efc8a8a97a510013'/>
<id>urn:sha1:2a56ab44360aa49bd0df9281efc8a8a97a510013</id>
<content type='text'>
The new LLCoros::Stop exception is intended to terminate long-lived coroutines
-- not interrupt mainstream shutdown processing. Only throw it on an
explicitly-launched coroutine.

Make LLCoros::getName() (used by the above test) static. As with other LLCoros
methods, it might be called after the LLCoros LLSingleton instance has been
deleted. Requiring the caller to call instance() implies a possible need to
also call wasDeleted(). Encapsulate that nuance into a static method instead.
</content>
</entry>
<entry>
<title>DRTVWR-476: Back out changeset 40c0c6a8407d ("final" LLApp listener)</title>
<updated>2020-03-25T23:02:24Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-24T20:05:37Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=26c8ccfc06bc9334c9a4d0d027e83ad0b1b92a86'/>
<id>urn:sha1:26c8ccfc06bc9334c9a4d0d027e83ad0b1b92a86</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-476: Pump coroutines a few more times when we start quitting.</title>
<updated>2020-03-25T23:02:24Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-24T16:54:38Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=cbf146f2b3fc255bc83f2b01101dc29658bea6ea'/>
<id>urn:sha1:cbf146f2b3fc255bc83f2b01101dc29658bea6ea</id>
<content type='text'>
By the time "LLApp" listeners are notified that the app is quitting, the
mainloop is no longer running. Even though those listeners do things like
close work queues and inject exceptions into pending promises, any coroutines
waiting on those resources must regain control before they can notice and shut
down properly. Add a final "LLApp" listener that resumes ready coroutines a
few more times.

Make sure every other "LLApp" listener is positioned before that new one.
</content>
</entry>
<entry>
<title>DRTVWR-476: Don't name the caught exception</title>
<updated>2020-03-25T23:02:24Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-23T00:48:36Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=7541e784d991888d6f600f4cb9439d5fcf15e452'/>
<id>urn:sha1:7541e784d991888d6f600f4cb9439d5fcf15e452</id>
<content type='text'>
unless we're going to reference it.
</content>
</entry>
<entry>
<title>DRTVWR-476: Terminate long-lived coroutines to avoid shutdown crash.</title>
<updated>2020-03-25T23:02:24Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-10-22T21:14:26Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=1345a02b21a83bc4ee7ff72efc1858e956f18c53'/>
<id>urn:sha1:1345a02b21a83bc4ee7ff72efc1858e956f18c53</id>
<content type='text'>
Add LLCoros::TempStatus instances around known suspension points so
printActiveCoroutines() can report what each suspended coroutine is waiting
for.

Similarly, sprinkle checkStop() calls at known suspension points.

Make LLApp::setStatus() post an event to a new LLEventPump "LLApp" with a
string corresponding to the status value being set, but only until
~LLEventPumps() -- since setStatus() also gets called very late in the
application's lifetime.

Make postAndSuspendSetup() (used by postAndSuspend(), suspendUntilEventOn(),
postAndSuspendWithTimeout(), suspendUntilEventOnWithTimeout()) add a listener
on the new "LLApp" LLEventPump that pushes the new LLCoros::Stopping exception
to the coroutine waiting on the LLCoros::Promise. Make it return the new
LLBoundListener along with the previous one.

Accordingly, make postAndSuspend() and postAndSuspendWithTimeout() store the
new LLBoundListener returned by postAndSuspendSetup() in a LLTempBoundListener
(as with the previous one) so it will automatically disconnect once the wait
is over.

Make each LLCoprocedurePool instance listen on "LLApp" with a listener that
closes the queue on which new work items are dispatched. Closing the queue
causes the waiting dispatch coroutine to terminate. Store the connection in an
LLTempBoundListener on the LLCoprocedurePool so it will disconnect
automatically on destruction.

Refactor the loop in coprocedureInvokerCoro() to instantiate TempStatus around
the suspending call.

Change a couple spammy LL_INFOS() calls to LL_DEBUGS(). Give all logging calls
in that module a "CoProcMgr" tag to make it straightforward to re-enable the
LL_DEBUGS() calls as desired.
</content>
</entry>
</feed>
