diff options
author | Nicky Dasmijn <sl.nicky.ml@googlemail.com> | 2020-05-20 13:12:31 +0000 |
---|---|---|
committer | Nat Linden <nat@lindenlab.com> | 2020-05-20 13:12:31 +0000 |
commit | 8c1c1b692fe5c5d6906c3c422fbf773c1782d553 (patch) | |
tree | 888f524c491c1702092c35915f3882bcbce2f4de | |
parent | 003ba682a1b7555a41f4c095b927d19c96a77256 (diff) | |
parent | 13b4bd58324e265db5b6d7392f0202c07af1e303 (diff) |
Merged in NickyD/viewer-vs2017-git-deadlock/d476-channel (pull request #2)
Make sure coproc gets destroyed after each iteration. Making coproc scoped to the for loop will make sure the destructor gets called every loop iteration. Keeping it's scope outside the for loop means the pointer keeps valid till the next assigment that h
Approved-by: Nat Linden <nat@lindenlab.com>
-rw-r--r-- | indra/llmessage/llcoproceduremanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 4168e0c67b..210b83ae2d 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -342,10 +342,10 @@ void LLCoprocedurePool::coprocedureInvokerCoro( CoprocQueuePtr pendingCoprocs, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter) { - QueuedCoproc::ptr_t coproc; - boost::fibers::channel_op_status status; for (;;) { + QueuedCoproc::ptr_t coproc; + boost::fibers::channel_op_status status; { LLCoros::TempStatus st("waiting for work for 10s"); status = pendingCoprocs->pop_wait_for(coproc, std::chrono::seconds(10)); |