叼花硬汉 2009-10-26 09:41 采纳率: 0%
浏览 317

在 PHP 中什么是线程安全或非线程安全?

I saw different binaries for PHP, like non-thread or thread safe? What does this mean? What is the difference between these packages?

转载于:https://stackoverflow.com/questions/1623914/what-is-thread-safe-or-non-thread-safe-in-php

  • 写回答

4条回答 默认 最新

  • ℡Wang Yan 2010-11-21 17:34
    关注

    For me, I always choose non-thread safe version because I always use nginx, or run PHP from the command line.

    The non-thread safe version should be used if you install PHP as a CGI binary, command line interface or other environment where only a single thread is used.

    A thread-safe version should be used if you install PHP as an Apache module in a worker MPM (multi-processing model) or other environment where multiple PHP threads run concurrently.

    评论

报告相同问题?