File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ - (void)_getDatabaseProcessListInBackground:(id)object;
627
627
628
628
[processList setReturnDataAsStrings: YES ];
629
629
630
- [processes removeAllObjects ];
630
+ [[ processes onMainThread ] removeAllObjects ];
631
631
632
632
for (i = 0 ; i < [processList numberOfRows ]; i++)
633
633
{
@@ -650,7 +650,11 @@ - (void)_getDatabaseProcessListInBackground:(id)object;
650
650
[rowsFixed setObject: num forKey: @" Time" ];
651
651
}
652
652
653
- [processes addObject: [[rowsFixed copy ] autorelease ]];
653
+ // This is pretty bad from a performance standpoint, but we must not
654
+ // interfere with the NSTableView's reload cycle and there is no way
655
+ // to know when it starts/ends. We only know it will happen on the
656
+ // main thread, so we have to interlock with that.
657
+ [[processes onMainThread ] addObject: [[rowsFixed copy ] autorelease ]];
654
658
[rowsFixed release ];
655
659
}
656
660
You can’t perform that action at this time.
0 commit comments