summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcoproceduremanager.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-10-25 16:10:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 19:05:17 -0400
commitcc6f1d6195c457dc744ff23ac06ccd3a2d948aca (patch)
tree99de59fff1f54404f06782cd98cca25af35c6b99 /indra/llmessage/llcoproceduremanager.h
parent9008124d352a195616bc8e7b88b048f479cdc4c2 (diff)
DRTVWR-476: Use shared_ptr to manage lifespan of coprocedure queue.
Since the consuming coroutine LLCoprocedurePool::coprocedureInvokerCoro() has been observed to outlive the LLCoprocedurePool instance that owns the CoprocQueue_t, closing that queue isn't enough to keep the coroutine from crashing at shutdown: accessing a deleted CoprocQueue_t is fatal whether or not it's been closed. Make LLCoprocedurePool store a shared_ptr to a heap CoprocQueue_t instance, and pass that shared_ptr by value to consuming coroutines. That way the CoprocQueue_t instance is guaranteed to live as long as the last interested party.
Diffstat (limited to 'indra/llmessage/llcoproceduremanager.h')
-rw-r--r--indra/llmessage/llcoproceduremanager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h
index 299ec6742f..c9b853fc4c 100644
--- a/indra/llmessage/llcoproceduremanager.h
+++ b/indra/llmessage/llcoproceduremanager.h
@@ -32,6 +32,7 @@
#include "llcoros.h"
#include "llcorehttputil.h"
#include "lluuid.h"
+#include <boost/smart_ptr/shared_ptr.hpp>
class LLCoprocedurePool;