Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: straight-C DNS lookup with timeout?



Well, that would rock, except that currently I'm using NSThreads, which cannot be killed (unless someone has figured out how to do so, since the last time we all discussed this topic).

I really should be using pthreads anyway for portability reasons. I wonder if pthreads can be killed? If so, that would be great. I would make the switch in a heartbeat if that were the case.

Anyone know if pthreads can be killed from the main thread?

- Philip


On Monday, December 30, 2002, at 04:22 AM, David Rio Vierra wrote:

This is probably the worst idea in the history of threaded programming, but have you considered implementing the timeout yourself by running gethostbyaddr() in a second thread, having your first thread sleep for a while, then kill the second if it hasn't found the hostent?

On Monday, December 30, 2002, at 12:09 AM, Philip George wrote:

I'm using gethostbyaddr() right now, but I'm open for any straight-C suggestions. I must set a quicker timeout on the lookup. The default timeout is way too long for gethostbyaddr().

Thanks.

- Philip
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Re: straight-C DNS lookup with timeout? (From: David Rio Vierra <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.