src/runtime_src/xdp/profile/database/database.cpp
// This function should return true the first time any plugin calls it.
//  The plugin that has ownership is the only one that should be responsible
//  for writing the run summary.
This function should return true the first time any plugin calls it.
The plugin that has ownership is the only one that should be responsible
for writing the run summary.
This function should return true the first time any plugin calls it . The plugin that has ownership is the only one that should be responsible for writing the run summary .
bool VPDatabase::claimRunSummaryOwnership()
  {
    static std::mutex runSummaryLock ;
    static bool claimed = false ;
    std::lock_guard<std::mutex> lock(runSummaryLock) ;
    if (claimed)
    {
      return false ;
    }
    claimed = true ;
    return true ;
  }
bool VPDatabase :: claimRunSummaryOwnership ( ) { static std :: mutex runSummaryLock ; static bool claimed = false ; std :: lock_guard < std :: mutex > lock ( runSummaryLock ) ; if ( claimed ) { return false ; } claimed = true ; return true ; }
This function should return true the first time any plugin calls it.
This function should return true the first time any plugin calls it .