I think it's right to multiply by 1000 because usleep(t) sleeps for t
microseconds
not miliseconds. Right?
This is correct, usleep is in microseconds.
Agree. Should have read twice.
As an aside, we don't actually use this constant anymore and should
probably remove it.
Ok, thanks, good to know.
JensG
--------------------------------------------------
From: "Mark Slee" <ms...@facebook.com>
Sent: Monday, October 18, 2010 8:57 PM
To: <thrift-dev@incubator.apache.org>
Subject: RE: TFileTransport.cpp readTimeout_
This is correct, usleep is in microseconds.
As an aside, we don't actually use this constant anymore and should
probably remove it.
mcs...@dev110 ~/local/thrift-apache/trunk/lib/cpp/src $grep -r
DEFAULT_READ_TIMEOUT *
transport/.svn/text-base/TFileTransport.h.svn-base: static const int32_t
DEFAULT_READ_TIMEOUT_MS = 200;
transport/TFileTransport.h: static const int32_t DEFAULT_READ_TIMEOUT_MS
= 200;
No other appearances of this constant that I can find...
We now initialize readTimeout_ as follows:
, readTimeout_(NO_TAIL_READ_TIMEOUT)
Cheers,
mcslee
-----Original Message-----
From: Igor Ribeiro de Assis [mailto:igor.as...@gmail.com]
Sent: Sunday, October 17, 2010 6:13 PM
To: thrift-dev@incubator.apache.org
Subject: Re: TFileTransport.cpp readTimeout_
I think it's right to multiply by 1000 because usleep(t) sleeps for t
microseconds not miliseconds. Right?
Igor
On Oct 17, 2010, at 12:03 PM, Jens Geyer wrote:
In TFileTransport::readEvent() the readTimeout_ is used this way:
usleep(readTimeout_ * 1000);
However, there is an constant near the declaration of readTimeout_ which
says
int32_t readTimeout_;
static const int32_t DEFAULT_READ_TIMEOUT_MS = 200;
Thus applying the default value could cause a wait of 200 seconds, IMHO.
Correct?
JensG