Re: NSRunLoop question
Re: NSRunLoop question
- Subject: Re: NSRunLoop question
- From: Brian Webster <email@hidden>
- Date: Wed, 14 Aug 2002 14:14:03 -0500
On Wednesday, August 14, 2002, at 01:03 PM, Gerben Wierda wrote:
On Wednesday, August 14, 2002, at 06:15 , Brian Webster wrote:
The docs for -[NSRunLoop run] state "If there are no input
sources in the run loop, it exits immediately". So, removing
your port from the run loop should cause it to stop running.
Yes, that is what I read too. So, I tried this but I must be
doing something wrong, because it does not work.
I'm not sure what other input sources could be in your run loop,
but if you call getCFRunLoop on the NSRunLoop and then CFShow()
the result, you'll get a complete description of all the sources
in the underlying CFRunLoop. That might give you an idea of
what's preventing the run loop from stopping. The
CFRunLoopStop() function might also be of interest.
Another thing you could do would be to make a while loop and
repeatedly call runMode:untilDate:, which is basically what the
run method does anyway, only you can terminate the while loop by
setting a flag when your server is done with what it needs to do.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.