1qce7 2018-02-11 11:10:12 +08:00
根据官方对于 built in server 的说明 ，我来猜测一下
This web server was designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network.
The web server runs a only one single-threaded process, so PHP applications will stall if a request is blocked.
本来就不是设计用来做 full-featured web server 的，重点是第 2 段，单线程进程，所以异步的 sleep 把之前请求阻塞了
如果你换成 python sleep.py ，就不会出现这个问题