thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: "oneway" doesn't seem to work with PHP
Date Thu, 17 Mar 2011 16:43:20 GMT
Sounds like a bug to me. I'm not aware of any existing issue, but you might
want to do a search in our JIRA.

On Thu, Mar 17, 2011 at 8:59 AM, Souvik Roy <da.comp.guy@gmail.com> wrote:

> Hi
> I'm aware that PHP doesn't have threading support yet, hence a
> MultiThreaded thrift server is not possible with Thrift in PHP
> (right?). But I was under an impression than "oneway" asynchronous
> functions do work with Thrift - PHP:server. But that doesn't seem to
> be the case. To reproduce it, I wrote a small function defined as
> follows:
>
> //Server snippet
> public function test($test_bigint){
> echo 'before sleep '. $test_bigint;
> sleep(10);
> echo 'after sleep '. $test_bigint;
> }
>
> //Client snippet
> for($i=0;$i<10;$i++){
>    $client->test($i);
>  }
>
> //Thrift IDL
> service someservice{
> oneway void test(1:i64 test_bigint)
> }
>
> Ideally, the above should be executed asynchronously and should not
> wait for the function to finish execution (and print "before sleep"$i
> all through the iterated times at first). But the actual output waits
> for sleep(10) and is executed synchronously.
> Is this a known feature Bug? If this topic has been already discussed
> earlier, can anyone please point me to the thread URL ?
>
> Thanks
> --
> Souvik Roy
> http://www.souvikroy.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message