• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Terminating a thread...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminating a thread...


  • Subject: Terminating a thread...
  • From: John Cebasek <email@hidden>
  • Date: Mon, 2 Mar 2009 09:58:05 -0500

Hi All:

I've got an NSThread that copies some data from one database to another. While the copy is occurring, there's a sheet that is updated with the progress of the copy. On that sheet there's also a stop button, so that if the user wants to stop the copy, he can.

I seem to be having some trouble trying to terminate the thread. In the IBaction for the stop button, I've got:

-(IBAction)closeProgressDialog:(id)sender
{
	DebugLog(@"%@", @"ConvertV1Database:closeProgressDialog");

	[m_migrateThread cancel];
	[self closeProgressDialogSheet];
}

Where m_migrateThread is obtained via:

m_migrateThread = [[NSThread alloc] initWithTarget:self
					  selector:@selector(convertDatabaseToSQLite3:)
					object:nil];
[m_migrateThread start];

Any hints on what I might be doing wrong?

Thanks in advance for your time


John _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Terminating a thread...
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Animate the way a HUD panel appears.
  • Next by Date: Re: Terminating a thread...
  • Previous by thread: [MEET] CocoaHeads Sydney This Thursday
  • Next by thread: Re: Terminating a thread...
  • Index(es):
    • Date
    • Thread