Skip to content

Commit

Permalink
feat(ios): use created dispatch_queue_t instead of main
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 20, 2023
1 parent c294171 commit b173d18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ios/RNLlama.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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];
Expand Down

0 comments on commit b173d18

Please sign in to comment.