Make recursion depth thread-local in ServiceExecutor tests

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Service Arch 2020-08-10
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The atomic variable used in ServiceExecutorFixedFixture::FlattenRecursiveScheduledTasks (see here) to track the recursion depth should be replaced by a thread-local integer, making it safe for multiple executor threads to run tasks without concurrently bumping up the recursion depth.

      Having a thread-local variable to track recursion depth is necessary since another executor thread (i.e., exec2) may start executing a task immediately after it's been scheduled by another thread (i.e., exec1), making it appear as the thread that scheduled the task (exec1) is executing it recursively.

            Assignee:
            Amirsaman Memaripour
            Reporter:
            Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: