Skip to content

Commit

Permalink
HPCC-32768 Ensure setActvity() destroys activities outside the critic…
Browse files Browse the repository at this point in the history
…al section

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Oct 2, 2024
1 parent 50ed84f commit d61cf5e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roxie/ccd/ccdqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,8 +1409,12 @@ class CRoxieWorker : public CInterface, implements IPooledThread
}
inline void setActivity(IRoxieAgentActivity *act)
{
CriticalBlock b(actCrit);
activity.setown(act);
//Ensure that the activity is released outside of the critical section
Owned<IRoxieAgentActivity> temp(act);
{
CriticalBlock b(actCrit);
activity.swap(temp);
}
}
inline bool match(RoxiePacketHeader &h)
{
Expand Down

0 comments on commit d61cf5e

Please sign in to comment.