diff options
author | Max <post@wickenrode.com> | 2015-06-16 00:56:55 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-06-17 11:54:30 +0200 |
commit | 8febe85e1cb92fa7f4fc073607bd8b08f850b446 (patch) | |
tree | b1f3ea051ff2394c2cc2fc4a9034af676b71bbb3 /Source/SPProcessListController.m | |
parent | 07a6789ae1f24fd41af801055f9d372ed4811251 (diff) | |
download | sequelpro-8febe85e1cb92fa7f4fc073607bd8b08f850b446.tar.gz sequelpro-8febe85e1cb92fa7f4fc073607bd8b08f850b446.tar.bz2 sequelpro-8febe85e1cb92fa7f4fc073607bd8b08f850b446.zip |
Experimental change to see if it improves #2114 (crashes in server process list)
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r-- | Source/SPProcessListController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index 5f8a422e..e61dfc30 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -627,7 +627,7 @@ static NSString *SPTableViewIDColumnIdentifier = @"Id"; [processList setReturnDataAsStrings:YES]; - [processes removeAllObjects]; + [[processes onMainThread] removeAllObjects]; for (i = 0; i < [processList numberOfRows]; i++) { @@ -650,7 +650,11 @@ static NSString *SPTableViewIDColumnIdentifier = @"Id"; [rowsFixed setObject:num forKey:@"Time"]; } - [processes addObject:[[rowsFixed copy] autorelease]]; + // This is pretty bad from a performance standpoint, but we must not + // interfere with the NSTableView's reload cycle and there is no way + // to know when it starts/ends. We only know it will happen on the + // main thread, so we have to interlock with that. + [[processes onMainThread] addObject:[[rowsFixed copy] autorelease]]; [rowsFixed release]; } |