summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-07 07:37:06 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-08 01:50:04 -0800
commit695fdd5caa5344cc25f55d5440ab1f18d3ee3641 (patch)
treed4f27bdeb301ee1426e5232bab6684643cf367a4
parent622a99126213420bc058313adf85d5064ecd4947 (diff)
Avoid concurrent database filter and refresh.
-rw-r--r--MobileCydia.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 0c07bbf..9d7881a 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -6015,6 +6015,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
- (NSArray *) _reloadPackages:(NSArray *)packages {
+// XXX: maybe move @synchronized() to _reloadData?
+@synchronized (database_) {
NSMutableArray *filtered([NSMutableArray arrayWithCapacity:[packages count]]);
_profile(PackageTable$reloadData$Filter)
@@ -6024,7 +6026,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
_end
return filtered;
-}
+} }
- (void) _reloadData {
if (reloading_ != 0) {