Go to file
Nat Goodspeed 26570cfd67 SL-793: Use Boost.Fiber instead of the "dcoroutine" library.
Longtime fans will remember that the "dcoroutine" library is a Google Summer
of Code project by Giovanni P. Deretta. He originally called it
"Boost.Coroutine," and we originally added it to our 3p-boost autobuild
package as such. But when the official Boost.Coroutine library came along
(with a very different API), and we still needed the API of the GSoC project,
we renamed the unofficial one "dcoroutine" to allow coexistence.

The "dcoroutine" library had an internal low-level API more or less analogous
to Boost.Context. We later introduced an implementation of that internal API
based on Boost.Context, a step towards eliminating the GSoC code in favor of
official, supported Boost code.

However, recent versions of Boost.Context no longer support the API on which
we built the shim for "dcoroutine." We started down the path of reimplementing
that shim using the current Boost.Context API -- then realized that it's time
to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API,
which we've been itching to do for literally years now.

Naturally, most of the heavy lifting is in llcoros.{h,cpp} and
lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of
the differences between "dcoroutine" and Boost.Fiber.

The one feature Boost.Fiber does not provide is the ability to forcibly
terminate some other fiber. Accordingly, disable LLCoros::kill() and
LLCoprocedureManager::shutdown(). The only known shutdown() call was in
LLCoprocedurePool's destructor.

We also took the opportunity to remove postAndSuspend2() and its associated
machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(),
LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time
when the Responder pattern was king, and we assumed we'd want to listen on one
LLEventPump with the success handler and on another with the error handler. We
have never actually used that in practice. Remove associated tests, of course.

There is one other semantic difference that necessitates patching a number of
tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting
coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as
ready to resume next time the scheduler gets around to it. To observe the test
side effects, we've inserted a number of llcoro::suspend() calls -- also in
the main loop.

For a long time we retained a single unit test exercising the raw "dcoroutine"
API. Remove that.

Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a
hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for
that, remove the hack.

In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency
tracking in place of llcoro::get_id().

In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We
don't actually use the Boost.Coroutine for anything (though there exist
plausible use cases).
2018-05-10 21:46:07 -04:00
debian try to suppress some debian errors we don't care about 2015-11-10 09:55:05 -05:00
doc DRTVWR-418: Merge from latest viewer-release 2017-11-29 14:47:09 -05:00
etc Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
indra SL-793: Use Boost.Fiber instead of the "dcoroutine" library. 2018-05-10 21:46:07 -04:00
scripts MAINT-7081: Make packages-formatter.py handle multi-line copyrights. 2017-09-27 15:25:29 -04:00
.hgignore DRTVWR-418: Don't report anything in new build-vc120-{32,64}. 2016-11-23 12:06:31 -05:00
.hgtags Added tag 5.0.9-release for changeset 40ca7118765b 2017-11-29 11:26:46 -08:00
BuildParams Automated merge with ssh://bitbucket.org/lindenlab/viewer64 2016-12-16 08:55:38 -05:00
README.md dummy checkin to build an upgrade target 2017-05-17 18:10:43 -07:00
autobuild.xml Automated merge with ssh://bitbucket.org/lindenlab/viewer-451 2018-01-12 16:23:30 -05:00
build.sh MAINT-7192: upgrade to VMP package 506412 2017-06-12 13:26:19 -07:00

README.md

Second Life Viewer

This project manages the source code for the Second Life Viewer.

This source is available as open source; for details on licensing, see the licensing page on the Second Life wiki

For information on how to use and contribute to this, see the open source portal on the wiki.

To download the current default version, visit the download page. For even newer versions try the Alternate Viewers page