MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / Notify

Method Notify

cpp/src/platform/unix/WaitImpl.cpp:143–162  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Notify all the watchers that the object has become signalled -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

141// Notify all the watchers that the object has become signalled
142//-----------------------------------------------------------------------------
143void WaitImpl::Notify
144(
145)
146{
147 if( pthread_mutex_lock( &m_criticalSection ) != 0 )
148 {
149 fprintf(stderr, "WaitImpl::Notify lock error %d\n", errno );
150 assert( 0 );
151 }
152 for( list<Watcher>::iterator it=m_watchers.begin(); it!=m_watchers.end(); ++it )
153 {
154 Watcher const& watcher = *it;
155 watcher.m_callback( watcher.m_context );
156 }
157 if( pthread_mutex_unlock( &m_criticalSection ) != 0 )
158 {
159 fprintf(stderr, "WaitImpl::Notify unlock error %d\n", errno );
160 assert( 0 );
161 }
162}

Callers 1

RunMethod · 0.45

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected