You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Peter S <ht...@gmail.com> on 2012/02/26 11:09:20 UTC

[thrift-java] Call another server asynchronously from a service function

Hi all,

I am wondering how to call another server asynchronously from a service
function. For example, service A need to call service B's function
asynchronously in order not to block the current thread. Does thrift
support this? I know there is asynchronous client, but it seems cannot be
used in this case.

Does thrift has something like:
service_func(int arg1, int arg2, ServiceContext ctx)
When the service is done, call ctx.done(response) to notify the underline
transport to send out the response rather than sending out the return value
of service_func.

Thanks.

Regards,
Peter