Revision: 14321
http://sourceforge.net/p/skim-app/code/14321
Author: hofman
Date: 2024-06-10 15:24:00 +0000 (Mon, 10 Jun 2024)
Log Message:
-----------
Use DISPATCH_QUEUE_SERIAL and QOS values to get dispatch queues, use high
priority for conversion actions
Modified Paths:
--------------
trunk/SKAttachmentEmailer.m
trunk/SKConversionProgressController.m
trunk/SKMainDocument.m
trunk/SKPDFSynchronizer.m
Modified: trunk/SKAttachmentEmailer.m
===================================================================
--- trunk/SKAttachmentEmailer.m 2024-06-10 14:52:18 UTC (rev 14320)
+++ trunk/SKAttachmentEmailer.m 2024-06-10 15:24:00 UTC (rev 14321)
@@ -158,7 +158,7 @@
NSAppleScript *script = [[NSAppleScript alloc]
initWithSource:scriptString];
static dispatch_queue_t queue = NULL;
if (queue == NULL)
- queue =
dispatch_queue_create("net.sourceforge.skim-app.queue.NSAppleScript", NULL);
+ queue =
dispatch_queue_create("net.sourceforge.skim-app.queue.NSAppleScript",
DISPATCH_QUEUE_SERIAL);
dispatch_async(queue, ^{
NSDictionary *errorDict = nil;
BOOL success = [script compileAndReturnError:&errorDict];
Modified: trunk/SKConversionProgressController.m
===================================================================
--- trunk/SKConversionProgressController.m 2024-06-10 14:52:18 UTC (rev
14320)
+++ trunk/SKConversionProgressController.m 2024-06-10 15:24:00 UTC (rev
14321)
@@ -177,7 +177,7 @@
NSAssert(provider != NULL, @"no PS data provider");
CGDataProviderRetain(provider);
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,
0), ^{
+ dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
CFMutableDataRef pdfData = CFDataCreateMutable(kCFAllocatorDefault, 0);
CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData(pdfData);
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2024-06-10 14:52:18 UTC (rev 14320)
+++ trunk/SKMainDocument.m 2024-06-10 15:24:00 UTC (rev 14321)
@@ -1142,7 +1142,7 @@
if (annotations) {
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0),
^{
// if pdfDocWithoutNotes was nil, the document was not encrypted,
so no need to try to unlock
PDFDocument *pdfDoc = pdfDocWithoutNotes ?: [[PDFDocument alloc]
initWithData:pdfData];
Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m 2024-06-10 14:52:18 UTC (rev 14320)
+++ trunk/SKPDFSynchronizer.m 2024-06-10 15:24:00 UTC (rev 14321)
@@ -60,7 +60,7 @@
- (instancetype)init {
self = [super init];
if (self) {
- queue =
dispatch_queue_create("net.sourceforge.skim-app.queue.SKPDFSynchronizer", NULL);
+ queue =
dispatch_queue_create("net.sourceforge.skim-app.queue.SKPDFSynchronizer",
DISPATCH_QUEUE_SERIAL);
lock = [[NSLock alloc] init];
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