pivotal-jbarrett commented on a change in pull request #812:
URL: https://github.com/apache/geode-native/pull/812#discussion_r756470894



##########
File path: cppcache/integration-test/ThinClientSecurityHelper.hpp
##########
@@ -198,18 +198,26 @@ class putThread : public ACE_Task_Base {
   }
 
   void start() {
-    m_run = true;
-    activate(THR_NEW_LWP | THR_JOINABLE, m_numthreads);
+    for(auto i = 0; i < m_numthreads; ++i) {
+      threads_.emplace_back([this](){
+        run();
+      });
+    }
+  }
+
+  void wait() {
+    for(auto& thread : threads_) {
+      if(thread.joinable()) {
+        thread.join();
+      }
+    }
   }
 
   void stop() {
-    if (m_run) {
-      m_run = false;

Review comment:
       With the removal of `m_run = false` what is left to tell the tasks to 
end?

##########
File path: cppcache/integration-test/ThinClientTransactionsXA.hpp
##########
@@ -355,72 +356,73 @@ const bool NO_ACK = false;
 #define THREADERRORCHECK(x, y) \
   do {                         \
     if (!(x)) {                \
-      m_isFailed = true;       \
-      m_error = y;             \
-      return -1;               \
+      failed_ = true;          \
+      error_ = y;              \
+      return;                  \
     }                          \
   } while (0)
 
-class SuspendTransactionThread : public ACE_Task_Base {
- private:
-  TransactionId* m_suspendedTransaction;
-  bool m_sleep;
-  ACE_Auto_Event* m_txEvent;
-
+class SuspendTransactionThread {
  public:
-  SuspendTransactionThread(bool sleep, ACE_Auto_Event* txEvent)
-      : m_suspendedTransaction(nullptr), m_sleep(sleep), m_txEvent(txEvent) {}
+  SuspendTransactionThread(bool sleep, binary_semaphore& event)
+      : sleep_{sleep}, tx_{nullptr}, sem_(event) {}
 
-  int svc(void) override {
+  void run() {
     LOG(" In SuspendTransactionThread");
 
-    auto txManager = getHelper()->getCache()->getCacheTransactionManager();
+    auto txm = getHelper()->getCache()->getCacheTransactionManager();

Review comment:
       When changing variable names please tend towards full names over 
abbreviations. 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to