Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Experimental change to see if it improves #2114 (crashes in server pr…
…ocess list)
  • Loading branch information
dmoagx committed Jun 15, 2015
1 parent 0a2f79c commit b7b9b15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/SPProcessListController.m
Expand Up @@ -627,7 +627,7 @@ - (void)_getDatabaseProcessListInBackground:(id)object;

[processList setReturnDataAsStrings:YES];

[processes removeAllObjects];
[[processes onMainThread] removeAllObjects];

for (i = 0; i < [processList numberOfRows]; i++)
{
Expand All @@ -650,7 +650,11 @@ - (void)_getDatabaseProcessListInBackground:(id)object;
[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];
}

Expand Down

0 comments on commit b7b9b15

Please sign in to comment.