Revision: 29644
http://sourceforge.net/p/bibdesk/svn/29644
Author: hofman
Date: 2025-09-29 16:01:17 +0000 (Mon, 29 Sep 2025)
Log Message:
-----------
schedule update notifications on main queue from async queue, only the delegate
call needs to be on the main thread
Modified Paths:
--------------
trunk/bibdesk/BDSKFileSearchIndex.m
Modified: trunk/bibdesk/BDSKFileSearchIndex.m
===================================================================
--- trunk/bibdesk/BDSKFileSearchIndex.m 2025-09-29 15:56:22 UTC (rev 29643)
+++ trunk/bibdesk/BDSKFileSearchIndex.m 2025-09-29 16:01:17 UTC (rev 29644)
@@ -287,9 +287,8 @@
#pragma mark Update callbacks
-- (void)searchIndexDidUpdate
+- (void)didUpdate
{
- BDSKASSERT([NSThread isMainThread]);
// Make sure we send frequently enough to update a progress bar, but not
too frequently to avoid beachball on single-core systems; too many search
updates slow down indexing due to repeated flushes.
if (NO == atomic_load(&flags.updateScheduled)) {
CGFloat updateDelay = atomic_load(&flags.status) ==
BDSKSearchIndexStatusRunning ? 1.0 : 0.1;
@@ -308,15 +307,6 @@
[delegate searchIndexDidUpdateStatus:self];
}
-- (void)didUpdate
-{
- if (NO == atomic_load(&flags.updateScheduled)) {
- dispatch_async(dispatch_get_main_queue(), ^{
- [self searchIndexDidUpdate];
- });
- }
-}
-
- (void)updateStatus:(BDSKSearchIndexStatus)status
{
atomic_store(&flags.status, status);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit