My c++ library create a thread with pthread_create somewhere in the code. Using my library inside a stand-alone application works great, but when using it in PHP extension. The function never returns.
void* threadloop(void * param)
{
zend_printf("B
");
}
PHP_FUNCTION(create_thread)
{
pthread_t othread;
pthread_create (&othread, NULL, threadloop, NULL);
zend_printf("A
");
}
The "B" is never printed.
How can I do this?
Thanks!