Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8138863

Refactor WaitForBarrierGCTask

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • 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.

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

                Created:
                Updated:
                Resolved: