Re: Scheduling a selector when a thread completes
Re: Scheduling a selector when a thread completes
- Subject: Re: Scheduling a selector when a thread completes
- From: Ken Tozier <email@hidden>
- Date: Thu, 30 Apr 2009 15:31:42 -0400
On Apr 29, 2009, at 11:48 PM, Michael Ash wrote:
Seems like you're adding a lot of complication for what is essentially
a continually running operation. Instead of that, why not do this?
1. Spawn a thread.
2. Sample files.
3. Sleep.
4. Goto 2.
Or, in code:
- (void)threadMethod {
while(1) {
[self sampleFiles];
sleep(5);
}
}
That looked very promising, but when I tried it, it locks up the app
during launch. It enters the thread but blocks the folder scanner from
calling my console view's KCLogMessage function.
_______________________________________________
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