site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Aug 19, 2010, at 22:56 , Jerry Krinock wrote: -- Steve Checkoway _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com Thank you, Terry. Fortunately for my feeble brain the problem was none of the rocket science you explained, just this one: On 2010 Aug 16, at 17:38, Terry Lambert wrote: you have another thread camping out on the fd in kevent(). Indeed, my app operates by creating a kqueue in the main thread with kevent(…,EV_ADD|EV_ENABLE,…), and then spinning off a new thread via -[NSThread detachNewThreadSelector:::]. The new thread camps out on kevent() in a loop like this: Why not have a timeout on the kevent? If kevent returns with a timeout, then check some state (for exmaple the isCancelled method of NSThread) and exit if appropriate. Otherwise, loop. smime.p7s