thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Miller <da...@deadpansincerity.com>
Subject Re: Python - Killing an active Thrift call
Date Sun, 17 Jun 2012 13:35:05 GMT
On 14 June 2012 20:06, Dan Kuebrich <dan.kuebrich@gmail.com> wrote:

> I don't know that there's a built-in facility for this, but it sounds like
> what timeouts are often used for.

Quite

>  Can you use timeouts on the thrift client sockets
> for this?


The Python TSocket class has a setTimeout method which IIUC is your best
bet for somewhere to bail on a call.

It raises some kind of exception IIRC (possibly socket.timeout, although
this would be trivial to check).

Example code here:

https://github.com/davidmiller/rpc/blob/master/rpc/thrifty.py#L13

-- 
Love regards etc

David Miller
http://www.deadpansincerity.com
07854 880 883

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