Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2028

Cleanup threading headers / libraries

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Later
    • Affects Version/s: 0.9
    • Fix Version/s: 0.10.0
    • Component/s: C++ - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The current threading implementations have some minor annoyances:
      All do some amount of internal state tracking with an enum that ends up being overkill.
      All use weak_ptrs to help manage lifetimes, instead of the enable_shared_from_this base class that was designed for exactly this purpose.
      All of the specific thread factories implement "detached" methods, but the base thread factory doesn't have virtual methods exposing the detached methods.
      The thread manager has an unused local.
      Adding a "UniqueGuard" class to Mutex.h, to give more flexible RAII management to locks. Currently no clients of this, but I have some patches that will eventually use this.

        Attachments

        1. thread_cleanup.patch
          16 kB
          Ben Craig

          Activity

            People

            • Assignee:
              ben.craig Ben Craig
              Reporter:
              ben.craig Ben Craig
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: