Skip to content

Commit

Permalink
fix: avoid call mutex after context destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
jingpeng committed Oct 7, 2023
1 parent bde6031 commit 809735a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/dangle/DangleContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ namespace dangle {
// [JS thread] Add a blocking operation to the 'next' batch -- waits for the
// queued function to run before returning
void addBlockingToNextBatch(Op &&op) noexcept {
if (destroy) {
DangleSysLog("addBlockingToNextBatch after DangleContext destroyed");
return;
}

try {
std::mutex mutex;
m_done = false;
Expand Down

0 comments on commit 809735a

Please sign in to comment.