mirror of https://github.com/facebook/rocksdb.git
CloseHandle docs says that the return is non-zero, does not say TRUE(1)
Summary: say it is TRUE(1). Add assert. Closes https://github.com/facebook/rocksdb/pull/3630 Differential Revision: D7346895 Pulled By: ajkr fbshipit-source-id: a46075aa4dd89f32520230606adecccecc874cdf
This commit is contained in:
parent
93d52696bf
commit
61785c73ed
|
@ -138,7 +138,9 @@ void WindowsThread::join() {
|
||||||
"WaitForSingleObjectFailed: thread join");
|
"WaitForSingleObjectFailed: thread join");
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseHandle(reinterpret_cast<HANDLE>(data_->handle_));
|
BOOL rc;
|
||||||
|
rc = CloseHandle(reinterpret_cast<HANDLE>(data_->handle_));
|
||||||
|
assert(rc != 0);
|
||||||
data_->handle_ = 0;
|
data_->handle_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +156,7 @@ bool WindowsThread::detach() {
|
||||||
BOOL ret = CloseHandle(reinterpret_cast<HANDLE>(data_->handle_));
|
BOOL ret = CloseHandle(reinterpret_cast<HANDLE>(data_->handle_));
|
||||||
data_->handle_ = 0;
|
data_->handle_ = 0;
|
||||||
|
|
||||||
return (ret == TRUE);
|
return (ret != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsThread::swap(WindowsThread& o) {
|
void WindowsThread::swap(WindowsThread& o) {
|
||||||
|
|
Loading…
Reference in New Issue