Markus Fischer wrote: > On Fri, Mar 29, 2002 at 09:14:46AM -0800, Shane Caraveo wrote : > >>Markus Fischer wrote: >> >>> Hi, >>> >>> how much thread-safe is PHP on linux when compiled with >>> --enable-experimental-zts ? When I a set up a callback >>> handler for a 3rd library which uses threads and in this (C) >>> callback I call call_user_function() (to provide custom >>> callbacks) -> bang , I get a segfault. Should it work and I'm >>> doing something stupid or is this some limitation? Hints? >>> >>> - Markus >>> >> >>PHP is thread safe, not multi-threaded. ie. scripts cannot be >>multi-threaded. You will have to somehow proxy the data back to the >>original calling thread for your library to work. > > > Ah, understood. So, the short answer would be it was by own > stupidity ;-) > > About proxying the data .. you don't happen to have some more > description or resource how to accomplish this before I try > to reinvent the wheel ? thanks. > > - Markus >
You'll probably be able to get away with using condition variables, but it's too much to describe, and I haven't done much pthreads stuff. You could get the o'reilly pthreads book for reference, or dig around for exampls on the net. Shane -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php