On Thu, Mar 6, 2014 at 5:51 PM, Chris Jones <notifications@github.com>wrote:

> In EventFilter/Utilities/plugins/FastMonitoringService.cc:
>
> > +    //make sure that all path names are retrieved before allowing ministate to change
> > +    //hack: assume memory is synchronized after ~50 events seen by each stream
> > +    if (unlikely(eventCountForPathInit_[sc.streamID()]<50) && false==collectedPathList_[sc.streamID()]->load(std::memory_order_acquire))
> > +    {
> > +      initPathsLock_.lock();
> > +      if (firstEventId_[sc.streamID()]==0)
> > +	firstEventId_[sc.streamID()]=sc.eventID().event();
> > +      if (sc.eventID().event()==firstEventId_[sc.streamID()])
> > +      {
> > +	encPath_[sc.streamID()].update((void*)&pc.pathName());
> > +	initPathsLock_.unlock();
> > +	return;
> > +      }
> > +      else {
> > +	collectedPathList_[sc.streamID()]->store(true,std::memory_order_seq_cst);
> > +        fmt_.m_data.ministateBins_=encPath_[sc.streamID()].vecsize();
>
> Are all uses of fmt_.m_data.ministateBins_ protected by initPathsLock_? I
> couldn't seem to find anywhere that used it outside of registerVariables.
>
They aren't. A monlock could however be used to protect it in this place
wrt. the boost thread to avoid the data race.

> --
> Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/2661/files#r10349474>
> .
>