Revision: 16035
http://sourceforge.net/p/skim-app/code/16035
Author: hofman
Date: 2026-02-05 16:43:34 +0000 (Thu, 05 Feb 2026)
Log Message:
-----------
access syncFileName atomically as it can change from the main thread when
changing the fileName
Modified Paths:
--------------
trunk/SKPDFSynchronizer.m
Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m 2026-02-05 15:56:49 UTC (rev 16034)
+++ trunk/SKPDFSynchronizer.m 2026-02-05 16:43:34 UTC (rev 16035)
@@ -43,14 +43,14 @@
static NSArray *SKPDFSynchronizerTexExtensions = nil;
@interface SKPDFSynchronizer ()
-@property (nonatomic, nullable, strong) NSString *syncFileName;
+@property (nullable, strong) NSString *syncFileName;
@property (nullable, readonly) NSDate *lastModDate;
@end
@implementation SKPDFSynchronizer
-@synthesize delegate, syncFileName;
-@dynamic fileName, lastModDate;
+@synthesize delegate;
+@dynamic fileName, syncFileName, lastModDate;
+ (void)initialize {
SKINITIALIZE;
@@ -106,6 +106,13 @@
[lock unlock];
}
+- (NSString *)syncFileName {
+ [lock lock];
+ NSString *file = syncFileName;
+ [lock unlock];
+ return file;
+}
+
// this should only be used from the server thread
- (void)setSyncFileName:(NSString *)newSyncFileName {
// make sure the path is absolute and standardized
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