File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 99
1010#import < RNReanimated/REAIOSScheduler.h>
1111#import < RNReanimated/REAIOSErrorHandler.h>
12+ #import " MakeJSIRuntime.h"
1213
1314using namespace facebook ;
1415
@@ -32,11 +33,21 @@ - (void)setBridge:(RCTBridge *)bridge
3233 }
3334
3435 auto callInvoker = bridge.jsCallInvoker ;
35- mrousavy::multithreading::install (*(jsi::Runtime *)cxxBridge.runtime , [callInvoker]() {
36+
37+ auto makeRuntime = []() -> std::unique_ptr<jsi::Runtime> {
38+ return mrousavy::multithreading::makeJSIRuntime ();
39+ };
40+ auto makeScheduler = [callInvoker]() -> std::shared_ptr<reanimated::Scheduler> {
3641 return std::make_shared<reanimated::REAIOSScheduler>(callInvoker);
37- }, [](std::shared_ptr<reanimated::Scheduler> scheduler) {
42+ };
43+ auto makeErrorHandler = [](std::shared_ptr<reanimated::Scheduler> scheduler) -> std::shared_ptr<reanimated::ErrorHandler> {
3844 return std::make_shared<reanimated::REAIOSErrorHandler>(scheduler);
39- });
45+ };
46+
47+ mrousavy::multithreading::install (*(jsi::Runtime *)cxxBridge.runtime ,
48+ makeRuntime,
49+ makeScheduler,
50+ makeErrorHandler);
4051}
4152
4253@end
You can’t perform that action at this time.
0 commit comments