Skip to content
Snippets Groups Projects
  1. Nov 06, 2021
  2. Aug 09, 2021
  3. Aug 08, 2021
  4. Jun 20, 2021
  5. Apr 18, 2021
  6. Apr 05, 2021
  7. Mar 16, 2021
  8. Jan 22, 2021
  9. Jan 11, 2021
  10. Dec 17, 2020
  11. Nov 10, 2020
  12. Nov 07, 2020
  13. Nov 06, 2020
  14. Oct 20, 2020
  15. Oct 15, 2020
  16. Oct 08, 2020
  17. Oct 05, 2020
  18. Sep 29, 2020
  19. Sep 08, 2020
  20. Aug 08, 2020
  21. Aug 07, 2020
  22. Jul 21, 2020
  23. Jun 23, 2020
  24. Mar 25, 2020
    • Nat Goodspeed's avatar
      DRTVWR-476: Add unit tests for LLMainThreadTask. · 38da7d5d
      Nat Goodspeed authored
      Now that we have the Sync class to help construct unit tests that move forward
      in a deterministic stepwise order, we can build suitable unit tests for
      LLMainThreadTask.
      38da7d5d
    • Nat Goodspeed's avatar
    • Nat Goodspeed's avatar
      DRTVWR-476: Remove llwrap(), LLListenerWrapper[Base] and support. · 18e2b9ca
      Nat Goodspeed authored
      The only usage of any of this was in test code.
      18e2b9ca
    • Nat Goodspeed's avatar
      DRTVWR-476: Add basic tests for LLCond. · 9a3afe96
      Nat Goodspeed authored
      9a3afe96
    • Nat Goodspeed's avatar
      SL-793: Use Boost.Fiber instead of the "dcoroutine" library. · 66981fab
      Nat Goodspeed authored
      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).
      66981fab
    • Nat Goodspeed's avatar
      DRTVWR-494: Add LLMainThreadTask to perform work on the main thread. · 960593fd
      Nat Goodspeed authored
      If already running on the main thread, LLMaintThreadTask simply runs the work
      inline. Otherwise it queues it for the main thread using LLEventTimer, using
      std::future to retrieve the result.
      960593fd
    • Nat Goodspeed's avatar
      DRTVWR-494: Extract LockStatic as a standalone template class. · 1f7335fd
      Nat Goodspeed authored
      The pattern of requiring a lock to permit *any* access to a static instance of
      something seems generally useful. Break out lockstatic.h; recast
      LLInstanceTracker to use it.
      
      Moving LockStatic to an external template class instead of a nested class in
      LLInstanceTrackerBase leaves LLInstanceTrackerBase pretty empty. Get rid of it.
      
      And *that* means we can move the definition of the StaticData used by each
      LLInstanceTracker specialization into the class itself, rather than having to
      define it beforehand in namespace LLInstanceTrackerStuff.
      1f7335fd
  25. Sep 19, 2019
Loading