aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataImport.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/SPDataImport.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/SPDataImport.m')
-rw-r--r--Source/SPDataImport.m13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m
index 3a2f3004..027b7113 100644
--- a/Source/SPDataImport.m
+++ b/Source/SPDataImport.m
@@ -47,6 +47,7 @@
#import "SPFieldMapperController.h"
#import "SPFileHandle.h"
#import "SPEncodingPopupAccessory.h"
+#import "SPThreadAdditions.h"
#import <SPMySQL/SPMySQL.h>
#import <UniversalDetector/UniversalDetector.h>
@@ -263,8 +264,8 @@
if (importFileName == nil) return;
- // begin import process
- [NSThread detachNewThreadSelector:@selector(_importBackgroundProcess:) toTarget:self withObject:importFileName];
+ // Begin import process
+ [NSThread detachNewThreadWithName:@"SPDataImport background import task" target:self selector:@selector(_importBackgroundProcess:) object:importFileName];
}
@@ -334,7 +335,7 @@
if (importFileName == nil) return;
// Begin the import process
- [NSThread detachNewThreadSelector:@selector(_importBackgroundProcess:) toTarget:self withObject:importFileName];
+ [NSThread detachNewThreadWithName:@"SPDataImport background import task" target:self selector:@selector(_importBackgroundProcess:) object:importFileName];
}
/**
@@ -343,7 +344,7 @@
- (void)startSQLImportProcessWithFile:(NSString *)filename
{
[importFormatPopup selectItemWithTitle:@"SQL"];
- [NSThread detachNewThreadSelector:@selector(_importBackgroundProcess:) toTarget:self withObject:filename];
+ [NSThread detachNewThreadWithName:@"SPDataImport background import task" target:self selector:@selector(_importBackgroundProcess:) object:filename];
}
#pragma mark -
@@ -680,7 +681,7 @@
[tablesListInstance updateTables:self];
// Re-query the structure of all databases in the background
- [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
+ [NSThread detachNewThreadWithName:@"SPNavigatorController database structure querier" target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
// Import finished Growl notification
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Import Finished"
@@ -1202,7 +1203,7 @@
[tablesListInstance performSelectorOnMainThread:@selector(updateTables:) withObject:self waitUntilDone:YES];
// Re-query the structure of all databases in the background
- [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
+ [NSThread detachNewThreadWithName:@"SPNavigatorController database structure querier" target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
// Select the new table
[tablesListInstance selectItemWithName:selectedTableTarget];