Revision: 13907
          http://sourceforge.net/p/skim-app/code/13907
Author:   hofman
Date:     2023-12-16 14:47:23 +0000 (Sat, 16 Dec 2023)
Log Message:
-----------
use dispatch_sync for locking, avoids copying the block

Modified Paths:
--------------
    trunk/SKPDFSynchronizer.m

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2023-12-16 10:18:09 UTC (rev 13906)
+++ trunk/SKPDFSynchronizer.m   2023-12-16 14:47:23 UTC (rev 13907)
@@ -118,7 +118,7 @@
 - (void)setFileName:(NSString *)newFileName {
     // we compare filenames in canonical form throughout, so we need to make 
sure fileName also is in canonical form
     newFileName = [[newFileName stringByResolvingSymlinksInPath] 
stringByStandardizingPath];
-    dispatch_async(lockQueue, ^{
+    dispatch_sync(lockQueue, ^{
         if (fileName != newFileName) {
             if ([fileName isEqualToString:newFileName] == NO) {
                 syncFileName = nil;
@@ -139,7 +139,7 @@
 
 // this should only be used from the server thread
 - (void)setSyncFileName:(NSString *)newSyncFileName {
-    dispatch_async(lockQueue, ^{
+    dispatch_sync(lockQueue, ^{
         if (syncFileName != newSyncFileName) {
             syncFileName = newSyncFileName;
         }

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to