Revision: 29648
          http://sourceforge.net/p/bibdesk/svn/29648
Author:   hofman
Date:     2025-09-30 14:24:24 +0000 (Tue, 30 Sep 2025)
Log Message:
-----------
revert last commit, rename variable as name is inverted, chack variable directly

Modified Paths:
--------------
    trunk/bibdesk/BDSKNotesSearchIndex.h
    trunk/bibdesk/BDSKNotesSearchIndex.m

Modified: trunk/bibdesk/BDSKNotesSearchIndex.h
===================================================================
--- trunk/bibdesk/BDSKNotesSearchIndex.h        2025-09-30 14:17:15 UTC (rev 
29647)
+++ trunk/bibdesk/BDSKNotesSearchIndex.h        2025-09-30 14:24:24 UTC (rev 
29648)
@@ -48,7 +48,7 @@
 
 @interface BDSKNotesSearchIndex : NSObject {
     SKIndexRef skIndex;
-    _Atomic(BOOL) shouldKeepRunning;
+    _Atomic(BOOL) shouldStopRunning;
     _Atomic(BOOL) needsFlushing;
     _Atomic(BOOL) updateScheduled;
     BOOL terminated;

Modified: trunk/bibdesk/BDSKNotesSearchIndex.m
===================================================================
--- trunk/bibdesk/BDSKNotesSearchIndex.m        2025-09-30 14:17:15 UTC (rev 
29647)
+++ trunk/bibdesk/BDSKNotesSearchIndex.m        2025-09-30 14:24:24 UTC (rev 
29648)
@@ -63,7 +63,7 @@
 {
     self = [super init];
     if (self) {
-        shouldKeepRunning = NO;
+        shouldStopRunning = NO;
         needsFlushing = NO;
         terminated = NO;
         
@@ -89,16 +89,12 @@
     skIndex = NULL;
 }
 
-- (BOOL)shouldKeepRunning{
-    return atomic_load(&shouldKeepRunning);
-}
-
 - (void)clearQueue
 {
-    atomic_store(&shouldKeepRunning, YES);
+    atomic_store(&shouldStopRunning, YES);
     dispatch_sync(queue, ^{});
     if (terminated == NO)
-        atomic_store(&shouldKeepRunning, NO);
+        atomic_store(&shouldStopRunning, NO);
 }
 
 - (void)terminate
@@ -128,7 +124,7 @@
     
     dispatch_async(queue, ^{
         for (NSDictionary *item in items) {
-            if ([self shouldKeepRunning] == NO) break;
+            if (atomic_load(&shouldStopRunning)) break;
             NSURL *identifierURL = [item 
objectForKey:BDSKBibItemIdentifierURLKey];
             NSArray *fileURLs = [item objectForKey:BDSKBibItemURLsKey];
             [self indexItemForIdentifierURL:identifierURL fileURLs:fileURLs 
removeEmpty:YES];
@@ -141,7 +137,7 @@
     
     dispatch_async(queue, ^{
         for (NSURL *identifierURL in itemURLs) {
-            if ([self shouldKeepRunning] == NO) break;
+            if (atomic_load(&shouldStopRunning)) break;
             [self indexItemForIdentifierURL:identifierURL fileURLs:nil 
removeEmpty:YES];
         }
     });
@@ -171,7 +167,7 @@
     
     dispatch_async(queue, ^{
         for (NSDictionary *item in items) {
-            if ([self shouldKeepRunning] == NO) break;
+            if (atomic_load(&shouldStopRunning)) break;
             NSURL *identifierURL = [item 
objectForKey:BDSKBibItemIdentifierURLKey];
             NSArray *fileURLs = [item objectForKey:BDSKBibItemURLsKey];
             [self indexItemForIdentifierURL:identifierURL fileURLs:fileURLs 
removeEmpty:NO];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to