Skip to content

Commit e212441

Browse files
committed
Remove global worklet runtime mutex
1 parent 958dbd9 commit e212441

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

android/src/main/cpp/MarkdownParser.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ namespace livemarkdown {
1111
jni::alias_ref<jhybridobject> jThis,
1212
jni::alias_ref<jni::JString> text,
1313
const int parserId) {
14-
static std::mutex workletRuntimeMutex; // this needs to be global since the worklet runtime is also global
15-
const auto lock = std::lock_guard<std::mutex>(workletRuntimeMutex);
16-
1714
const auto markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
1815
jsi::Runtime &rt = markdownRuntime->getJSIRuntime();
1916

apple/MarkdownParser.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#import "MarkdownParser.h"
22
#import <RNLiveMarkdown/MarkdownGlobal.h>
33
#import <React/RCTLog.h>
4-
#import <mutex>
54

65
@implementation MarkdownParser {
76
NSString *_prevText;
@@ -17,9 +16,6 @@ @implementation MarkdownParser {
1716
return _prevMarkdownRanges;
1817
}
1918

20-
static std::mutex workletRuntimeMutex; // this needs to be global since the worklet runtime is also global
21-
const auto lock = std::lock_guard<std::mutex>(workletRuntimeMutex);
22-
2319
const auto &markdownRuntime = expensify::livemarkdown::getMarkdownRuntime();
2420
jsi::Runtime &rt = markdownRuntime->getJSIRuntime();
2521

0 commit comments

Comments
 (0)