You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/12/02 15:41:00 UTC

[jira] [Commented] (GEODE-9324) Remove ACE_Task references

    [ https://issues.apache.org/jira/browse/GEODE-9324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17452470#comment-17452470 ] 

ASF GitHub Bot commented on GEODE-9324:
---------------------------------------

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



##########
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:
       Thanks for pointing this out. Thing is there is no mechanism now to tell the task to end, as there wasn't before. Because m_run was not used, except as a mean to tell whether or not the thread was started, but that was not necessary as the thread was run in a controlled environment and it was not going to be stopped before it was started, and this last part is not different now.




-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Remove ACE_Task references
> --------------------------
>
>                 Key: GEODE-9324
>                 URL: https://issues.apache.org/jira/browse/GEODE-9324
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Mario Salazar de Torres
>            Assignee: Mario Salazar de Torres
>            Priority: Major
>              Labels: obliterate-ace, pull-request-available
>
> *AS A* native client contributor
> *I WANT TO* remove all remaining references to ACE_Task
> *SO THAT* eventually we can get rid of ACE library
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)