[wp-hackers] Questions on execute-pings.php...
David Chait
davebytes at comcast.net
Mon Apr 24 21:28:58 GMT 2006
Why isn't it true for C/Java? You open up a socket to a webserver. That
spawns a 'thread' of execution of some sort to handle the connection.
Something executes in the context of that 'thread'. It does not happen in
the context of the caller. Now, whether/how the socket needs to stay open
for that thread to not be stopped prematurely is another topic entirely. ;)
But this should be caller-language independent -- only dependence is on the
socket handling and execution handling on the server end.
I would assume/presume the person who added that code had done testing --
and maybe had copied the approach from another project, not just making it
up. ;)
-d
----- Original Message -----
From: "Angsuman Chakraborty" <angsuman at taragana.com>
To: <wp-hackers at lists.automattic.com>
Sent: Monday, April 24, 2006 5:01 PM
Subject: RE: [wp-hackers] Questions on execute-pings.php...
> using a socket effectively spawns it off on another thread, another
> context,
Has this assumption been verified for php?
This isn't true for languages like C / Java. I haven't tested it for php but
it seems that would be rather strange behavior.
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com]On Behalf Of David Chait
Sent: Tuesday, April 25, 2006 1:43 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Questions on execute-pings.php...
Importance: Low
Someone correct me if I'm wrong... the 'include' would work within the
current thread, thus affecting the user response if something takes a while.
using a socket effectively spawns it off on another thread, another context,
without affecting the current session.
At least, that's what I seem to recall... ;)
-d
----- Original Message -----
From: "Angsuman Chakraborty" <angsuman at taragana.com>
To: <wp-hackers at lists.automattic.com>
Sent: Monday, April 24, 2006 2:36 PM
Subject: [wp-hackers] Questions on execute-pings.php...
Hi,
I don't understand why the query in the while loop which check for _pingme
rows doesn't check if the post is really ready to be pingbacked or
trackbacked (at least post_date < current time).
Also I am trying to understand the real reason behind calling this code via
a socket connection (instead of including it). is it merely in the hope that
due to the small timeout sometimes it will fail thereby achieving the
asynchronicity on pinback and trackback?
Can anyone please clarify.
Best,
Angsuman
http://blog.taragana.com/
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list