Re: I need help for PHP thread code [message #170566 is a reply to message #170564] |
Mon, 08 November 2010 16:33 |
The Natural Philosoph
Messages: 993 Registered: September 2010
Karma:
|
Senior Member |
|
|
Twayne wrote:
> In news:ib8vuh$n28$1(at)news(dot)eternal-september(dot)org,
> Jerry Stuckle <jstucklex(at)attglobal(dot)net> typed:
>> On 11/8/2010 8:52 AM, sheldonlg wrote:
>>> On 11/8/2010 8:35 AM, Jerry Stuckle wrote:
>>>> On 11/8/2010 8:16 AM, sheldonlg wrote:
>>>> > On 11/8/2010 8:09 AM, The Natural Philosopher wrote:
>>>> >> sheldonlg wrote:
>>>> >>> On 11/8/2010 3:39 AM, Andreas Otto wrote:
>>>> >>>> Hi,
>>>> >>>>
>>>> >>>> I have an library able to create threads by its own
>>>> >>>> ... and I want to use this "threads" to run PHP code on it
>>>> >>>>
>>>> >>>> The flow is:
>>>> >>>>
>>>> >>>> 1. start PHP
>>>> >>>> 2. external library is listen on socket
>>>> >>>> 3. external library create thread on new request
>>>> >>>> 4. now PHP should be linked to this new thread
>>>> >>>>
>>>> >>>> currently it is not working ... I use this code...
>>>> >>>>
>>>> >>>>
>>>> >>>> if (create == MQ_FACTORY_NEW_THREAD) {
>>>> >>>> // work on NEW thread
>>>> >>>> tsrm_set_interpreter_context(tsrm_new_interpreter_context());
>>>> >>>> tsrm_ls = (void ***) ts_resource_ex(0, NULL);
>>>> >>>> } else {
>>>> >>>> // work on an already available thread
>>>> >>>> tsrm_ls = (void ***) tmpl->threadData;
>>>> >>>> }
>>>> >>>>
>>>> >>>>
>>>> >>>> the problem is that interpreter global's are not
>>>> >>>> initialized, example:
>>>> >>>>
>>>> >>>> -> EG(objects_store).object_buckets) = 0x0
>>>> >>>>
>>>> >>>>
>>>> >>>> I need to run some initialization on a new external
>>>> >>>> thread Q: is help available?
>>>> >>>>
>>>> >>>>
>>>> >>>> mfg, Andreas Otto
>>>> >>> 1 - Is this supposed to be php?
>>>> >> looks like C to me.
>>>> > That was a sarcastic question. This is a php group.
>>>> >
>>>> >>> 2 - What are you talking about?
>>>> >>>
>>>> >> He wants to duplicate the way Apache invokes PHP, I
>>>> >> suspect. But using threading rather than forking..
>>>> > Again, that was a sarcastic question meaning "if you
>>>> > want help on something, take the time and trouble to
>>>> > explain your problem so that others can readily
>>>> > understand what you want". I guess this once again proves SDNWOTN.
>>>> > (Sarcasm Does
>>>> > Not Work On The Net --- actually made it into the
>>>> > dictionary of acronyms).
>>>> Don't worry, Sheldon - it works with intelligent people.
>>> Please Jerry, lets not have yet another TNP-Jerry trading
>>> insults thread.
>> It's impossible to insult an idiot, Sheldon. I was just
>> pointing out that your sarcasm was not wasted.
>
> You were "just" insultiing a person for no good reason Stukie and you know
> it. You're a real wart on the ass of progress for this group.
> May you survive a concussion that removes your memory and leaves you
> learning disabled.
>
>
I think thats already happened...;-)
|
|
|