Home > Article > Backend Development > php pthreads CLI has stop when using mutex
When PTHREADS uses mutex to lock, the cli crashes (WIN7)
Code:
<code><?php $mutex = Mutex::create(); var_dump(Mutex::lock($mutex)); ?></code>
If you can tell me where the php system log is (similar to APACHE's error.log).
Just to add:
According to the official PTHREADS, it is thread-safe. In theory, thread-safety itself means protecting resources shared between multiple threads. So what is the significance of this lock? I also tried multi-threaded operation of Threaded shared resources, and found that there was no problem with the final output. I don’t understand it very well. Please give me some advice
When PTHREADS uses mutex to lock, the cli crashes (WIN7)
Code:
<code><?php $mutex = Mutex::create(); var_dump(Mutex::lock($mutex)); ?></code>
If you can tell me where the php system log is (similar to APACHE's error.log).
Just to add:
According to the official PTHREADS, it is thread-safe. In theory, thread-safety itself means protecting resources shared between multiple threads. So what is the significance of this lock? I also tried multi-threaded operation of Threaded shared resources and found that there was no problem with the final output. I don’t understand it very well. Please give me some advice