Refactor WaitForBarrierGCTask

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • gc
    • b89

        The WaitForBarrierGCTask is used for two purposes. In GCTaskManager::execute_and_wait() it is used add a task to the end of the queue of tasks and then wait for that task to complete. This is a way to block until all tasks in the queue have been handled.

        In IdleGCTask::do_it() the WaitForBarrierGCTask is not used as a GCTask at all. It is merely used as a wrapper for a monitor. All IdleTasks should share the same monitor to be able to be notified when it is time to wake up.

        This second use case inside IdleGCTask is better handled by a class that is not a subclass of GCTask.

              Assignee:
              Bengt Rutisson (Inactive)
              Reporter:
              Bengt Rutisson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: