impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
Date Tue, 04 Oct 2016 22:52:50 GMT
Hello Henry Robinson,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4622

to look at the new patch set (#2).

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for >
1s
......................................................................

IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Our SleepForMs() function relied on usleep() which sleeps for 'n'
microseconds. However, the manpage for usleep() specifies that this
may not work for values > 1000000 us (or 1s).

This patch removes the use of usleep() and uses
std::this_thread::sleep_for() instead, which was introduced with C++11.

Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
---
M be/src/util/time.cc
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/4622/2
-- 
To view, visit http://gerrit.cloudera.org:8080/4622
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sailesh@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sailesh@cloudera.com>

Mime
View raw message