Permalink
Browse files

Apply changes from e1b881b to SPTableContent (part of #2770)

  • Loading branch information...
dmoagx committed May 14, 2017
1 parent f603e3f commit 5c717e027db5d5ac2d4bd937d6539ea4c1993257
Showing with 2 additions and 11 deletions.
  1. +0 −1 Source/SPTableContent.h
  2. +2 −10 Source/SPTableContent.m
View
@@ -125,7 +125,6 @@
BOOL _mainNibLoaded;
BOOL isWorking;
pthread_mutex_t tableValuesLock;
NSCondition *tableLoadingCondition;
#ifndef SP_CODA
NSMutableArray *nibObjectsToRelease;
#endif
View
@@ -172,7 +172,6 @@ - (id)init
usedQuery = [[NSString alloc] initWithString:@""];
tableLoadTimer = nil;
tableLoadingCondition = [NSCondition new];
blackColor = [NSColor blackColor];
lightGrayColor = [NSColor lightGrayColor];
@@ -1056,11 +1055,8 @@ - (void)updateResultStore:(SPMySQLStreamingResultStore *)theResultStore approxim
// Set up the table updates timer and wait for it to notify this thread about completion
[[self onMainThread] initTableLoadTimer];
[tableLoadingCondition lock];
while (![tableValues dataDownloaded]) {
[tableLoadingCondition waitUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]];
}
[tableLoadingCondition unlock];
[tableValues awaitDataDownloaded];
tableRowsCount = [tableValues count];
// If the final column autoresize wasn't performed, perform it
@@ -1265,10 +1261,7 @@ - (void) tableLoadUpdate:(NSTimer *)theTimer
}
if ([tableValues dataDownloaded]) {
[tableLoadingCondition lock];
[tableLoadingCondition signal];
[self clearTableLoadTimer];
[tableLoadingCondition unlock];
}
// Check whether a table update is required, based on whether new rows are
@@ -4226,7 +4219,6 @@ - (void)dealloc
if(fieldEditor) SPClear(fieldEditor);
[self clearTableLoadTimer];
SPClear(tableLoadingCondition);
SPClear(tableValues);
pthread_mutex_destroy(&tableValuesLock);
SPClear(dataColumns);

0 comments on commit 5c717e0

Please sign in to comment.