Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-2223

Eliminate separate mutex variables

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • None
    • None
    • shim - kubernetes
    • None

    Description

      In cache.Task, the lock variable is defined as:

      type Task struct {
          ...
          schedulingState TaskSchedulingState
          sm              *fsm.FSM
          lock            *sync.RWMutex
      } 

      This also applies to cache.Application and cache.Context.

      In other parts of the code, we simply embed sync.RWMutex. There's no need to have a separate variable. Locking and unlocking become simpler.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pbacsko Peter Bacsko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: