diff options
author | Martin Corino <mcorino@remedy.nl> | 2015-05-19 15:51:39 +0200 |
---|---|---|
committer | Martin Corino <mcorino@remedy.nl> | 2015-05-19 15:51:39 +0200 |
commit | 68d717f0575e13550df7d5044403e2b983318481 (patch) | |
tree | 119c53d0e546e8359eabc307e9b20c95f3d374c5 /ACE/ace/Task.cpp | |
parent | d8009f13298cfae88ec2f1ec5e452804d954b8a2 (diff) | |
download | ATCD-68d717f0575e13550df7d5044403e2b983318481.tar.gz |
Make the group id handling more consistent.
Diffstat (limited to 'ACE/ace/Task.cpp')
-rw-r--r-- | ACE/ace/Task.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ACE/ace/Task.cpp b/ACE/ace/Task.cpp index 210fe72b191..e1ff0ca2c67 100644 --- a/ACE/ace/Task.cpp +++ b/ACE/ace/Task.cpp @@ -125,10 +125,14 @@ ACE_Task_Base::activate (long flags, return 1; // Already active. else { - if (this->thr_count_ > 0 && this->grp_id_ != -1) + if ((this->thr_count_ > 0 || grp_id == -1) && + this->grp_id_ != -1) // If we're joining an existing group of threads then make - // sure to use its group id. + // sure to (re)use its group id. grp_id = this->grp_id_; + else if (grp_id != -1) + // make sure to reset the cached grp_id + this->grp_id_ = -1; this->thr_count_ += n_threads; } |