Mailing Lists: Apple Mailing Lists

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

how to stop a thread that's in a blocking call from the main thread



Hello,

I start a new thread using NSThread's class method
detachNewThreadSelector:toTarget:withObject:
The new thread  calls a library function that reads data from a socket
(the library is the Stomp protocol C client library). This function is
blocking.
I need  to stop this new thread immediately when the users asks it by,
for example, clicking a button, so I need to stop that thread from the
main thread. Which is the simplest way to do that?

Thanks in advance,

xavi
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to 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.