heronr commented on a change in pull request #4071: [Issue 
2461][pulsar-client-cpp] Modified CMake files and source to enable compilation 
on Windows
URL: https://github.com/apache/pulsar/pull/4071#discussion_r276904816
 
 

 ##########
 File path: pulsar-client-cpp/lib/ExecutorService.cc
 ##########
 @@ -55,9 +55,14 @@ DeadlineTimerPtr ExecutorService::createDeadlineTimer() {
 }
 
 void ExecutorService::close() {
-    io_service_.stop();
-    work_.reset();
-    worker_.join();
+    // Ensure this service has not already been closed. This is
+    // because worker_.join() is not re-entrant on Windows
+    if (work_)
+    {
 
 Review comment:
   Ok, I took this change out of this PR and into a new one, #4084 
   
   In addition, I realized that I didn't notice the check-format failure 
because the Windows version of the CMake files were omitting those targets. I 
re-added them and was able to correct a host of formatting mistakes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to