aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.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/SPDatabaseDocument.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/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 7f2abab6..63381d90 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -96,6 +96,7 @@ enum {
#import "SPBundleHTMLOutputController.h"
#import "SPConnectionDelegate.h"
#endif
+#import "SPThreadAdditions.h"
#ifdef SP_REFACTOR /* headers */
#import "SPAlertSheets.h"
@@ -549,7 +550,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
[self startTaskWithDescription:NSLocalizedString(@"Restoring session...", @"Restoring session task description")];
if ([NSThread isMainThread])
- [NSThread detachNewThreadSelector:@selector(restoreSession) toTarget:self withObject:nil];
+ [NSThread detachNewThreadWithName:@"SPDatabaseDocument session load task" target:self selector:@selector(restoreSession) object:nil];
else
[self restoreSession];
}
@@ -731,7 +732,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
NSDictionary *selectionDetails = [NSDictionary dictionaryWithObjectsAndKeys:database, @"database", item, @"item", nil];
if ([NSThread isMainThread]) {
- [NSThread detachNewThreadSelector:@selector(_selectDatabaseAndItem:) toTarget:self withObject:selectionDetails];
+ [NSThread detachNewThreadWithName:@"SPDatabaseDocument database and table load task" target:self selector:@selector(_selectDatabaseAndItem:) object:selectionDetails];
}
else {
[self _selectDatabaseAndItem:selectionDetails];
@@ -966,8 +967,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
[self _addDatabase];
// Query the structure of all databases in the background (mainly for completion)
- [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:databaseStructureRetrieval withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
-
+ [NSThread detachNewThreadWithName:@"SPNavigatorController database structure querier" target:databaseStructureRetrieval selector:@selector(queryDbStructureWithUserInfo:) object:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]];
}
else {
// Reset chooseDatabaseButton