|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-07-02 22:56 UTC] derkontrollfreak+9hy5l at gmail dot com
Description: ------------ My result of Example #1 from http://php.net/manual/en/worker.unstack.php differs from the one in the documentation. PHP configure line: ./configure --prefix="$HOME/local/php5" \ --disable-cgi \ --enable-maintainer-zts \ --with-libdir=/lib/x86_64-linux-gnu \ --without-pear \ --disable-all pthreads configure line: ./configure --prefix="$HOME/local/php5" \ --with-php-config="$HOME/local/php5/bin/php-config" I tested with pthreads 2.0.10 and the current git master 7d4e30a4cf. Test script: --------------- <?php class Work extends Threaded { public function run() { } } $my = new Worker(); $work = new Work(); var_dump($my->stack($work)); var_dump($my->unstack($work)); ?> Expected result: ---------------- int(1) int(0) Actual result: -------------- int(1) int(1) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |
pthreads v2 is no longer supported, and so this issue will not be resolved. The Worker::unstack() method has new semantics in pthreads v3, where it no longer accepts an argument - it just pops the top task from the stack. Your example code will now produce the following output: int(1) object(Work)#2 (0) { }