Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51821

Always join threads in SharedFuture tests

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • Fully Compatible
    • ALL
    • Service arch 2020-11-30
    • 23

    Description

      Some of the unit-tests for SharedFuture (e.g., ConcurrentTest_ManySharedFutures) create a number of worker threads to test the behavior of futures in presence of concurrency. An attempt to delete these threads before they are joined (e.g., due to an exception) would cause the termination of the unit-test process (i.e., invocation of std::terminate).

      To prevent the termination and ensure the real cause of failure remains always visible, we must ensure all worker threads are joined before they go out-of-scope.

      Attachments

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: