FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » I need help for PHP thread code
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
I need help for PHP thread code [message #170551] Mon, 08 November 2010 08:39 Go to next message
Andreas Otto is currently offline  Andreas Otto
Messages: 6
Registered: October 2010
Karma: 0
Junior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJM17dXAAoJEGTcPijNG3/AwZgH/RfSB6g/7hqlw2RBNsyj7fzD
BNw51EbNP7g2wLjBaHe252I/IgMyxr+hvsmuZKGxmPPijfL8ciKXVY+r8jQguNY9
Lt28Q8ebUNqFpmsebM6kFXlleBpP3R2OkjkQtFnTUh8hzk9uFOqMpd38vV0dPVPC
1SrRillsz/yhDMFXyIW7qNgWQb95gQqUOVJMvdL21i4jvpmPjij9wGQgtxRrEToS
vDXxM3FIdef2xDuF30K8yIAutvLe4wpHau1F38R31yafDSLtMLgKUy9xR0RU+EPe
EPd6V+cGThpy6Z1fBAgS1/6cXe2sneVsRNPp0hSpoYbNOOLEhEKzQ5R6yaTuy+4=
=Uq35
-----END PGP SIGNATURE-----
Re: I need help for PHP thread code [message #170553 is a reply to message #170551] Mon, 08 November 2010 12:59 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
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?
2 - What are you talking about?

--
Shelly
Re: I need help for PHP thread code [message #170554 is a reply to message #170553] Mon, 08 November 2010 13:09 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
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.

> 2 - What are you talking about?
>

He wants to duplicate the way Apache invokes PHP, I suspect.

But using threading rather than forking..
Re: I need help for PHP thread code [message #170555 is a reply to message #170554] Mon, 08 November 2010 13:16 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
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).

--
Shelly
Re: I need help for PHP thread code [message #170556 is a reply to message #170555] Mon, 08 November 2010 13:35 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: I need help for PHP thread code [message #170557 is a reply to message #170551] Mon, 08 November 2010 13:51 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 11/8/2010 3:39 AM, Andreas Otto wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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?
>
>

You're not going to get a lot of help here; most people are PHP
programmers but have not gotten into the C functions to start and/or
extend PHP. There also seems to be very limited information available
on this.

My recommendation would be to try the Zend site - perhaps you can get
some help there.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: I need help for PHP thread code [message #170558 is a reply to message #170556] Mon, 08 November 2010 13:52 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
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.

--
Shelly
Re: I need help for PHP thread code [message #170559 is a reply to message #170558] Mon, 08 November 2010 14:02 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: I need help for PHP thread code [message #170560 is a reply to message #170555] Mon, 08 November 2010 14:56 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
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).
>
Apologies. I assumed you were smarter than Jerry. And had realised
sarcasm was wasted on someone with such a poor command of english.
Re: I need help for PHP thread code [message #170562 is a reply to message #170560] Mon, 08 November 2010 16:04 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 11/8/2010 9:56 AM, The Natural Philosopher wrote:
> 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).
>>
> Apologies. I assumed you were smarter than Jerry. And had realised
> sarcasm was wasted on someone with such a poor command of english.

(a) you may have a point about the poor command of English.
(b) I won't be baited into any form of personal attack mode.

--
Shelly
Re: I need help for PHP thread code [message #170564 is a reply to message #170559] Mon, 08 November 2010 16:10 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
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.
Re: I need help for PHP thread code [message #170566 is a reply to message #170564] Mon, 08 November 2010 16:33 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
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...;-)
Re: I need help for PHP thread code [message #170569 is a reply to message #170566] Mon, 08 November 2010 17:29 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 11/8/2010 11:33 AM, The Natural Philosopher wrote:
> 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...;-)

Oh well, another thread down the tubes. Bye.

--
Shelly
Re: I need help for PHP thread code [message #170571 is a reply to message #170569] Mon, 08 November 2010 20:10 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <ib9c11$foa$1(at)news(dot)eternal-september(dot)org>,
sheldonlg <sheldonlg(at)thevillages(dot)net> wrote:

> On 11/8/2010 11:33 AM, The Natural Philosopher wrote:
>> 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:

[snip]

> Oh well, another thread down the tubes. Bye.

And the fuckers still haven't learnt to snip. Amazing.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: I need help for PHP thread code [message #170572 is a reply to message #170571] Mon, 08 November 2010 20:35 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Tim Streater wrote:
> In article <ib9c11$foa$1(at)news(dot)eternal-september(dot)org>,
> sheldonlg <sheldonlg(at)thevillages(dot)net> wrote:
>
>> On 11/8/2010 11:33 AM, The Natural Philosopher wrote:
>>> 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:
>
> [snip]
>
>> Oh well, another thread down the tubes. Bye.
>
> And the fuckers still haven't learnt to snip. Amazing.
>
Or to use a killfile. Sigh.

I wouldn't have seen any of it if someone ELSE hadn't responded to
Jerry's trolling.

If every one did the same, it might be a place to discuss PHP again.
Re: I need help for PHP thread code [message #170574 is a reply to message #170572] Mon, 08 November 2010 21:55 Go to previous messageGo to next message
Robert Hairgrove is currently offline  Robert Hairgrove
Messages: 19
Registered: September 2010
Karma: 0
Junior Member
The Natural Philosopher wrote:
> I wouldn't have seen any of it if someone ELSE hadn't responded to
> Jerry's trolling.

I dunno, it was kind of amusing watching from the sidelines (since I
also plonked Jerry a while back).

> If every one did the same, it might be a place to discuss PHP again.

Agreed.
Re: I need help for PHP thread code [message #170578 is a reply to message #170569] Mon, 08 November 2010 23:14 Go to previous messageGo to next message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.oO(sheldonlg)

> Oh well, another thread down the tubes. Bye.

Good newsreaders allow to filter subthreads. ;-)

Micha
Re: I need help for PHP thread code [message #170582 is a reply to message #170578] Tue, 09 November 2010 00:36 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 11/8/2010 6:14 PM, Michael Fesser wrote:
> .oO(sheldonlg)
>
>> Oh well, another thread down the tubes. Bye.
>
> Good newsreaders allow to filter subthreads. ;-)
>
> Micha

The problem with killfiling any of the participants here is that
occasionally I wander into a thread and actually _learn_ something. I
don't want to lose that, so I just skip over the thread when it turns to
insult trading.

--
Shelly
Re: I need help for PHP thread code [message #170590 is a reply to message #170582] Tue, 09 November 2010 10:30 Go to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.oO(sheldonlg)

> On 11/8/2010 6:14 PM, Michael Fesser wrote:
>> .oO(sheldonlg)
>>
>>> Oh well, another thread down the tubes. Bye.
>>
>> Good newsreaders allow to filter subthreads. ;-)
>>
>> Micha
>
> The problem with killfiling any of the participants here is that
> occasionally I wander into a thread and actually _learn_ something. I
> don't want to lose that, so I just skip over the thread when it turns to
> insult trading.

I don't filter the guys here, but in Forté Agent I can set a whole
thread or a part of it to 'ignore'.

Micha
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.
Next Topic: how to retrieve xml data from three tables of mysql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 20:28:36 GMT 2024

Total time taken to generate the page: 0.02858 seconds