pthreads-win32

pthread_create not enough space

百般思念 提交于 2019-12-11 20:37:29
问题 I'm using Pthreads with MinGW on Windows. A call to pthread_create returns a error which translates to "Not enough space". What kind of space does it refer to? Is the thread stack space? int scannerThreadReturnValue = pthread_create(&parserThreadHandle, &attr, parserThread, (void *)filename); if(scannerThreadReturnValue != 0) { printf("Unable to create thread %s\n", strerror(errno)); } else printf("Parser thread creation successfull\n"); 回答1: The error message most propably is wrong, as the

pthreads for PHP not executing parallel threads in Apache

*爱你&永不变心* 提交于 2019-12-04 11:26:25
问题 I'm using the pthreads extension for PHP. When I execute the PHP script from cmd on Windows I get parallel threads but when I call the same script from Apache I get a different result and it seems to me like single thread execution. Is there any configuration that I should make for Apache to get response like cmd (parallel)? class AsyncOperation extends Thread { public function __construct($arg){ $this->arg = $arg; } public function run(){ if($this->arg){ for($i = 0; $i < 50; $i++) { echo

pthreads for PHP not executing parallel threads in Apache

≯℡__Kan透↙ 提交于 2019-12-03 07:12:48
I'm using the pthreads extension for PHP. When I execute the PHP script from cmd on Windows I get parallel threads but when I call the same script from Apache I get a different result and it seems to me like single thread execution. Is there any configuration that I should make for Apache to get response like cmd (parallel)? class AsyncOperation extends Thread { public function __construct($arg){ $this->arg = $arg; } public function run(){ if($this->arg){ for($i = 0; $i < 50; $i++) { echo "Yoo " . $this->arg . "<br>\n"; } } } } $thread = new AsyncOperation("World ----------"); $thread2 = new

Portability of pthreads-win32 over various windows compilers

巧了我就是萌 提交于 2019-12-03 06:52:31
I'm using pthreads-win32 to allow threading support for windows. I have a cross platform project that uses pthreads and I want to make it work on windows with various compilers and different OS versions. At least, according to the documentation pthreads-win32 should work with MSVC and even MSVC builds provided. But I don't know if the library is tested with latest MSVC compilers like MSVC-2008 and if it is supported under 64bit windows. From Your own experience are you aware of any issues with this library? Any issues with MSVC8, MSVC9, MSVC10? Any issues with Windows x86_64? Any issues with