RE: [PHP-DEV] TameJS syntax for Async/Parallel execution in PHP
On Thu Aug 4 09:54 PM, Raymond Irving wrote:
> Hello,
>
> I came across this little library called TameJS (http://tamejs.org/)
> and fell in love with the it's syntax. This had me thinking if it was
> possible to add such features to a PHP CLI (or web app):
>
Thanks for sharing, never heard of tame. Love the await{} block
await {
mysql_query_async($sql, $args, defer($rs));
curl_post_async($url,$data, defer($response));
}
$rows = $rs->fetchAll();
> What do you think?
I think it would be really interesting r&d but likely a large undertaking to
get it to work within php
Also async processing makes a lot of sense of in the client since there's a
lot of idle processing power in the pc (dual core cpu etc..)
If many php processes are executing the same async code (server under load),
I'm not sure you'd get a net benefit.
My opinion, server-side caching is faster and more maintainable.
Thread (5 messages)