#805 Use a mutex to turn the insertion of a new ticket into an atomic operation

SVN:trunk[2953]
This commit is contained in:
Denis Flaven
2013-10-24 09:15:41 +00:00
parent 02e6658439
commit 272a249d14
4 changed files with 70 additions and 38 deletions

View File

@@ -148,7 +148,22 @@
<count_max>0</count_max>
</field>
</fields>
<methods/>
<methods>
<method id="DBInsertNoReload">
<static>false</static>
<access>public</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function DBInsertNoReload()
{
$oMutex = new iTopMutex('ticket_insert');
$oMutex->Lock();
$iKey = parent::DBInsertNoReload();
$oMutex->Unlock();
return $iKey;
}
]]></code>
</method>
</methods>
<presentation>
<details>
<items>