Commit Graph

24 Commits (26570cfd670b8996ed7332f263a723f889f002d0)

Author SHA1 Message Date
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
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 1eed334e7f MAINT-5629: Remove llares and llareslistener. Login now does not attempt to do a lookup on the server names and rewrite the URL.
MAINT-5614: Bad password status correctly detected.
2015-09-21 10:59:58 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Aimee Linden ffae589843 Post-convert merge by convert_monolith.py from /Users/Aimee/Documents/Work/Linden-Lab/Development/viewer/convert/viewer-identity-evolution 2010-09-03 17:41:39 +01:00
Aaron Terrell (Enus) 334c04ce1a standardizing a couple of stragler test 'suite' names as class name 2010-08-25 00:52:59 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Aimee Linden 0bc87df82b Change license on lllogin_test.cpp to allow it to be exported.
Set to viewergpl for now.
2010-08-12 15:06:31 +01:00
Nat Goodspeed 7b03037cac EXT-4193: Use different reply pumps for SRV and XMLRPC requests.
This eliminates the timing hole (introduced by EXT-3934 fix) in which a
belated SRV response could confuse the XMLRPC response code.
Extend unit tests to positively drive the bug and validate the fix.
2010-01-12 15:27:01 -05:00
Nat Goodspeed 0f89155e29 EXT-3934: On SRV timeout, don't fail, proceed with original URI. 2010-01-06 10:08:02 -05:00
Mark Palange (Mani) 18eea99b55 EXT-3536 Bugfix in lllogin.cpp when reading 'indeterminate' repsonse from login.cgi.
Also fixed up lllogin unit test to match the bugfix.
Reviewed by Brad
2009-12-17 17:52:06 -08:00
Nat Goodspeed fde12f0204 DEV-43463: use fixed Boost package on Windows 2009-12-04 17:32:09 -05:00
Nat Goodspeed be9480ab77 DEV-43463: skip() instead of commenting out lllogin_tests 2009-12-04 16:38:12 -05:00
Mark Palange (Mani) 5729a0a6a3 Fix to windows build breakages.
Reviewed by Brad
2009-12-03 13:11:35 -08:00
Nat Goodspeed 7b6ddb4106 DEV-43463: Keep LLEventPump's LLStandardSignal alive during post()
Replace LLEventPump's boost::scoped_ptr<LLStandardSignal> with
boost::shared_ptr. Take a local stack copy of that shared_ptr in post()
methods, and invoke the signal through that copy. This guards against scenario
in which LLEventPump gets destroyed during signal invocation. (See Jira for
details.) Re-enable Mani's test case that used to crash.
Introduce ll_template_cast<> to allow a template function to recognize a
parameter of a particular type.
Introduce LLListenerWrapper mechanism to support wrapper objects for
LLEventPump listeners. You instantiate an LLListenerWrapper subclass object
inline in the listen() call (typically with llwrap<>), passing it the real
listener, trusting it to forward the eventual call.
Introduce prototypical LLCoutListener and LLLogListener subclasses for
illustrative and diagnostic purposes. Test that LLLogListener doesn't block
recognizing LLEventTrackable base class bound into wrapped listener.
2009-11-30 12:57:45 -05:00
Mark Palange (Mani) 9054f31f89 Temporary build un breakage - removing broken unit test from build while fixing. 2009-11-12 18:56:55 -08:00
Mark Palange (Mani) f9f2852ff2 DEV-42715 Fixed lllogin SRV request timeout unit test.
Also made SRV config options not persistent.
reviewed by brad
2009-11-12 09:19:32 -08:00
Mark Palange (Mani) 51e3a486c6 Changes to fix an LLERRS caused by SRV request timeout.
Added settings to config SRV request params
Increased timeout to 10 seconds
Changed timeout to generate login failure event instead of an error.
Added unit test to cover SRV failure event.
2009-11-11 14:28:40 -08:00
Nat Goodspeed e3a4e3dc10 DEV-40930: Added ["change"] key to login-module status events. Changed
existing event calls to use state as "offline" or "online", with "change"
indicating the reason for this status event. Changed disconnect() to send
state "offline", change "disconnect" -- instead of replaying last auth
failure. Changed unit tests accordingly.
Changed LLLoginInstance::handleLoginEvent() to use LLEventDispatcher to route
calls to handleLoginFailure() et al.
Added LLEventDispatcher::get() to allow retrieving Callable by name and
testing for empty().
2009-10-09 19:42:59 -04:00
Nat Goodspeed ec52e19dd1 DEV-32777, QAR-1619: Disable MSVC Release-build optimization for LLCoros::launchImpl().
This fixes the Release-build crash in lllogin_test.cpp.
2009-09-25 10:55:25 -04:00
Nat Goodspeed ad40d64b0e DEV-32777: tip won't even build on Windows without pacifying MSVC warning 2009-06-17 15:13:48 +00:00
Nat Goodspeed c607752a9d DEV-32777: ensure that stack objects listening on persistent LLEventPumps get
properly disconnected when destroyed.
Break out Debug class and associated macros from lleventcoro_test.cpp into test/debug.h.
Add Debug output to lllogin_test.
2009-05-28 21:25:58 +00:00
Nat Goodspeed dc93462991 svn merge -r113003:119136 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-2 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-3 2009-05-11 20:05:46 +00:00