PHP Threads and Synchronization
问题 I'm new to PHP, so to get started I've decided to implement a singleton. While I am able to recreate the singleton pattern in php, but I am not sure how to implement double-checked locking. Is that even possible/needed in PHP. I have read somewhere that PHP is not multithreaded? Can someone confirm that? If it is multithreaded, can someone explain to me how lock() or synchronize() work in PHP? Thanks, Henry 回答1: Share-nothing Architecture PHP has a Share-nothing Architecture: Like HTTP, each