diff options
author | rowanbeentje <rowan@beent.je> | 2012-10-14 21:40:56 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-10-14 21:40:56 +0000 |
commit | 5aa4c866a68098c65cc8268621da0cbdc2725986 (patch) | |
tree | d0e45cfa7fd5632770bbf12b6935d9dba5ba8afe /Source/SPFavoritesController.m | |
parent | d8896ae0a22b0014d0b43706280c8a390f14b058 (diff) | |
download | sequelpro-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/SPFavoritesController.m')
-rw-r--r-- | Source/SPFavoritesController.m | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/SPFavoritesController.m b/Source/SPFavoritesController.m index e7c441fe..7958fea5 100644 --- a/Source/SPFavoritesController.m +++ b/Source/SPFavoritesController.m @@ -34,6 +34,7 @@ #import "SPFavoriteNode.h" #import "SPTreeNode.h" #import "SPGroupNode.h" +#import "SPThreadAdditions.h" #import "pthread.h" static SPFavoritesController *sharedFavoritesController = nil; @@ -113,11 +114,12 @@ static SPFavoritesController *sharedFavoritesController = nil; - (void)saveFavorites { pthread_mutex_lock(&favoritesLock); - - [NSThread detachNewThreadSelector:@selector(_saveFavoritesData:) - toTarget:self - withObject:[[[favoritesTree childNodes] objectAtIndex:0] dictionaryRepresentation]]; - + + [NSThread detachNewThreadWithName:@"SPFavoritesController background favorite save task" + target:self + selector:@selector(_saveFavoritesData:) + object:[[[favoritesTree childNodes] objectAtIndex:0] dictionaryRepresentation]]; + pthread_mutex_unlock(&favoritesLock); } |