MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / removeRequestHandler

Method removeRequestHandler

OgreMain/src/OgreWorkQueue.cpp:150–170  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

148 }
149 //---------------------------------------------------------------------
150 void DefaultWorkQueueBase::removeRequestHandler( uint16 channel, RequestHandler *rh )
151 {
152 OGRE_LOCK_RW_MUTEX_WRITE( mRequestHandlerMutex );
153
154 RequestHandlerListByChannel::iterator i = mRequestHandlers.find( channel );
155 if( i != mRequestHandlers.end() )
156 {
157 RequestHandlerList &handlers = i->second;
158 for( RequestHandlerList::iterator j = handlers.begin(); j != handlers.end(); ++j )
159 {
160 if( ( *j )->getHandler() == rh )
161 {
162 // Disconnect - this will make it safe across copies of the list
163 // this is threadsafe and will wait for existing processes to finish
164 ( *j )->disconnectHandler();
165 handlers.erase( j );
166 break;
167 }
168 }
169 }
170 }
171 //---------------------------------------------------------------------
172 void DefaultWorkQueueBase::addResponseHandler( uint16 channel, ResponseHandler *rh )
173 {

Callers 4

~ChunkHandlerMethod · 0.80
~PageMethod · 0.80
~LodWorkQueueWorkerMethod · 0.80
shutdownMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected