(file) Return to HTTPConnection.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/HTTPConnection.cpp between version 1.185 and 1.186

version 1.185, 2014/11/10 16:16:47 version 1.186, 2015/03/20 12:52:51
Line 360 
Line 360 
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return;         return;
     }     }
       // Lock monitor mutex before executing the message because, as part of the
       // processing, HTTPConnection calls back to the monitor to set
       // status (monitor::setStatus(...).
       // See bug 10044
       // monitor::setStatus() sets the monitor lock which, without this prior
       // monitor lock could result in a deadlock for HTTPConnection calls from
       // other threads. For example:
       //
       // monitor->_entriesLockMutex->dst->run-> httpConnection::run()
       // creates SocketMsg-> handleEnqueue-> _handleReadEvent->
       // Monitor::setstate(...)
       //
       // CIMOperationResponseEncoder::sendResponse->handleEnqueue->
       // _handleWriteEvent->(lock HTTPconnection->_closeConnection()
       //     Monitor::setState->_entriesMutex -- Deadlock
       //
       // TODO: There may be a more efficient way to handle this interaction than
       // completely mutual exclusion of the monitor and HTTPConnection but this
       // does remove the chance of deadlock. Today we are not sure what the
       // effect would be of another way to handle the setState
       AutoMutex monitorLock(_monitor->getLock());
  
     AutoMutex connectionLock(_connection_mut);     AutoMutex connectionLock(_connection_mut);
  


Legend:
Removed from v.1.185  
changed lines
  Added in v.1.186

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2