aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructure.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-10-14 21:40:56 +0000
committerrowanbeentje <rowan@beent.je>2012-10-14 21:40:56 +0000
commit5aa4c866a68098c65cc8268621da0cbdc2725986 (patch)
treed0e45cfa7fd5632770bbf12b6935d9dba5ba8afe /Source/SPTableStructure.m
parentd8896ae0a22b0014d0b43706280c8a390f14b058 (diff)
downloadsequelpro-5aa4c866a68098c65cc8268621da0cbdc2725986.tar.gz
sequelpro-5aa4c866a68098c65cc8268621da0cbdc2725986.tar.bz2
sequelpro-5aa4c866a68098c65cc8268621da0cbdc2725986.zip
- Add names for most threads created by Sequel Pro for easier debug
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r--Source/SPTableStructure.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index baf2a6f4..02defd7c 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -45,6 +45,7 @@
#import "RegexKitLite.h"
#import "SPTableFieldValidation.h"
#import "SPTableStructureLoading.h"
+#import "SPThreadAdditions.h"
#import <SPMySQL/SPMySQL.h>
@@ -516,7 +517,7 @@
NSNumber *removeKey = [NSNumber numberWithBool:[(NSString *)contextInfo hasSuffix:@"AndForeignKey"]];
if ([NSThread isMainThread]) {
- [NSThread detachNewThreadSelector:@selector(_removeFieldAndForeignKey:) toTarget:self withObject:removeKey];
+ [NSThread detachNewThreadWithName:@"SPTableStructure field and key removal task" target:self selector:@selector(_removeFieldAndForeignKey:) object:removeKey];
[tableDocumentInstance enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL];
}
@@ -944,7 +945,7 @@
[tableDocumentInstance setContentRequiresReload:YES];
// Query the structure of all databases in the background
- [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", selectedTable, @"affectedItem", [NSNumber numberWithInteger:[tablesListInstance tableType]], @"affectedItemType", nil]];
+ [NSThread detachNewThreadWithName:@"SPNavigatorController database structure querier" target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", selectedTable, @"affectedItem", [NSNumber numberWithInteger:[tablesListInstance tableType]], @"affectedItemType", nil]];
return YES;
}