Answers.Body: <p>I would say no:</p>
  
  <ol>
  <li><p>As you've said PHP is not thread safe</p></li>
  <li><p>CiviCRM does not focus on preventing race conditions in a few cases. Event registration and max participant count was one case (it might be fixed by a contrib in recent versions)</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-24T05:49:30.447Z
Answers.Text: Thanks Lobo! Do you know how I could check in to the code if it prevent race conditions?
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-25T04:49:15.153Z
Answers.Text: unfortunately i think this would be a one workflow at a time process. I think operations using top level transactions are probably safer than the ones not using transactions
Answers.UserDisplayName: Donald Lobo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-22T14:14:53.597Z
Answers.LastActivityDate: 2015-05-22T14:14:53.597Z
Answers.UserDisplayName: Donald Lobo
Body: <p>My system administrator asked me if CiviCRM is thread safe. He could not really explain what he meant by that but he explained me that civicrm should be thread safe because he wants to use Apache Event module as a webserver.</p>
  
  <p>And I don't really know if CiviCRM is thread safe. I have read this topic <a href="https://stackoverflow.com/a/5978844/3853493">https://stackoverflow.com/a/5978844/3853493</a> 
  and it looks like PHP is the problem but not really an application written in PHP.</p>
  
  <p>The question really is, could we use Apache Event module in conjuction with CiviCRM.</p>
  
Tags: <webserver>
Title: Is CiviCRM thread safe
ThreadText: # Is CiviCRM thread safe
  
  (Asked by: username_0 on 2015-05-22)
  
  My system administrator asked me if CiviCRM is thread safe. He could not really explain what he meant by that but he explained me that civicrm should be thread safe because he wants to use Apache Event module as a webserver.
  
  And I don't really know if CiviCRM is thread safe. I have read this topic <https://stackoverflow.com/a/5978844/3853493>
  and it looks like PHP is the problem but not really an application written in PHP.
  
  The question really is, could we use Apache Event module in conjuction with CiviCRM.
  
  **Tags:** webserver
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-22. Score: 4
  
  I would say no:
  
  1. As you've said PHP is not thread safe
  2. CiviCRM does not focus on preventing race conditions in a few cases. Event registration and max participant count was one case (it might be fixed by a contrib in recent versions)
  
  > **Comments:**
  > **username_0**: Thanks Lobo! Do you know how I could check in to the code if it prevent race conditions?  
  > **username_1**: unfortunately i think this would be a one workflow at a time process. I think operations using top level transactions are probably safer than the ones not using transactions  
  
  ---
  
  