From b173d18ffdbcdb2fdf0bffc9e86004bec0322770 Mon Sep 17 00:00:00 2001 From: jhen Date: Wed, 20 Dec 2023 09:34:27 +0800 Subject: [PATCH] feat(ios): use created dispatch_queue_t instead of main --- example/ios/Podfile.lock | 4 ++-- ios/RNLlama.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a795c34..21fcdb6 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -8,7 +8,7 @@ PODS: - hermes-engine/Pre-built (= 0.72.3) - hermes-engine/Pre-built (0.72.3) - libevent (2.1.12) - - llama-rn (0.3.0-rc.7): + - llama-rn (0.3.0-rc.8): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1261,7 +1261,7 @@ SPEC CHECKSUMS: glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - llama-rn: e2a9023b5e3d836bd5ce11000a89cf2d532fffc8 + llama-rn: a344d3b9c89f4a0e5667c94ee01e6cdb2d1dd630 RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 diff --git a/ios/RNLlama.mm b/ios/RNLlama.mm index 6b8f32b..4d10938 100644 --- a/ios/RNLlama.mm +++ b/ios/RNLlama.mm @@ -70,7 +70,7 @@ @implementation RNLlama reject(@"llama_error", @"Context is busy", nil); return; } - dispatch_async(dispatch_get_main_queue(), ^{ // TODO: Fix for use in llamaDQueue + dispatch_async(llamaDQueue, ^{ @try { @autoreleasepool { resolve([context loadSession:filePath]); @@ -96,7 +96,7 @@ @implementation RNLlama reject(@"llama_error", @"Context is busy", nil); return; } - dispatch_async(dispatch_get_main_queue(), ^{ // TODO: Fix for use in llamaDQue + dispatch_async(llamaDQueue, ^{ @try { @autoreleasepool { int count = [context saveSession:filePath size:(int)size];