Jump to content

thread safe vs non thread safe


neginf

Recommended Posts

FastCGI is the most appropriate setup for IIS, and due to how CGI works there are not any threads so the non-thread-safe version of PHP is ideal.

 

As far as precautions to be taken, the only thing off hand would be if you are trying to setup a script that multiple people use to read/write from a set file. You'd need to use proper file locking to prevent any corruption due to one process reading and another writing. Note that this is not something a thread-safe version of php would fix, thread safety is an entirely different and unrelated issue.

 

The above usually isn't an issue, as if you find yourself wanting to do that, you should just be using a database instead. When using a database, then the DB server will handle all the locking/concurrent access protections for you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.