mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
#805 Use a mutex to turn the insertion of a new ticket into an atomic operation
SVN:trunk[2953]
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user