Skip to content

Commit fdc59bd

Browse files
Update FetchData.cpp
1 parent d98e91d commit fdc59bd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

native-src/sync_root_interface/callbacks/FetchData/FetchData.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ void CALLBACK fetch_data_callback_wrapper(_In_ CONST CF_CALLBACK_INFO *callbackI
177177

178178
{
179179
std::unique_lock<std::mutex> lock(ctx->mtx);
180-
while (!ctx->ready)
181-
{
182-
ctx->cv.wait(lock);
183-
}
180+
ctx->cv.wait(lock, [&ctx]()
181+
{ return ctx->ready; });
184182
}
185183

186184
wprintf(L"Remove transfer context\n");

0 commit comments

Comments
 (0)