On Mon, 2002-01-21 at 20:47, Alan Knowles wrote: > After spending yesterday looking at the pcntl library, I did at one > point attempt to get create_thread going, It didnt get very far, (it > segfaulted on emalloc - perhaps because thread_init had not been called) > but I did start wondering about the feasibilty.. > > Has anybody ever attempted it?
This is not currently possible because PHP/Zend is not reenterant. Thread safty is done by emulating processes via TSRM. The only way to add thread support to php would be to open individual executer/interpreters and then use some kind of mutexed shared variable system. This would require ALOT of engine work. Ask Zeev, and Andi if you would like : ) -Jason > The basic task of creating a set of php functions which wrapped the > thread library - based perhaps on some of the code in python's thread > library didnt seem particulary complex, however can anyone think of any > issues that would occur? > > Would it only work as a built in module rather than a loadable module? > > anyway, I couldnt find any threads 'on threads:)' on php-dev discussing > it - has anybody got any comments? > > regards > alan > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- Jason T. Greene Internet Software Engineer <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Use PHP: http://www.php.net -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]