aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPIndexesController.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/SPIndexesController.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/SPIndexesController.m')
-rw-r--r--Source/SPIndexesController.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index caaa5033..f2a26ef1 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -41,6 +41,7 @@
#import "SPDatabaseViewController.h"
#import "SPTableStructure.h"
#import "SPTableStructureLoading.h"
+#import "SPThreadAdditions.h"
#import <SPMySQL/SPMySQL.h>
@@ -656,7 +657,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
#endif
if ([NSThread isMainThread]) {
- [NSThread detachNewThreadSelector:@selector(_addIndexUsingDetails:) toTarget:self withObject:indexDetails];
+ [NSThread detachNewThreadWithName:@"SPIndexesController index creation thread" target:self selector:@selector(_addIndexUsingDetails:) object:indexDetails];
[dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL];
}
@@ -684,7 +685,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
[indexDetails setObject:[NSNumber numberWithBool:[(NSString *)contextInfo hasSuffix:@"AndForeignKey"]] forKey:@"RemoveForeignKey"];
if ([NSThread isMainThread]) {
- [NSThread detachNewThreadSelector:@selector(_removeIndexUsingDetails:) toTarget:self withObject:indexDetails];
+ [NSThread detachNewThreadWithName:@"SPIndexesController index removal thread" target:self selector:@selector(_removeIndexUsingDetails:) object:indexDetails];
[dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL];
}