RE: Threading problem using AsyncSocket
RE: Threading problem using AsyncSocket
- Subject: RE: Threading problem using AsyncSocket
- From: "Matthew Youney" <email@hidden>
- Date: Fri, 15 Aug 2008 13:54:28 -0400
- Importance: Normal
Jonathan,
Thank you sooo much for your assistance. Here's what ended up working for
me:
1. I did update my AsyncSocket class as suggested. Thanks.
2. I determined that my runloop was not functioning as expected using your
suggestions. As you said, there is a lot of information here, and although
I am well-versed now, it was/is new to me (defending my ignorance). Again,
thanks!
3. I used the ThreadWorker class which has a nice technique for keeping the
runloop alive while in the worker thread. This is a very well done class
that also provides all of the hooks for GUI update, and other niceties.
I still have one issue:
I am instantiating my class in the worker thread (as required per AsyncSocet
docs). When I dealloc my object (which calls the socket.disconnect method),
the socket(s) do not disconnect properly, and I end up with a "socket leak".
If I do not dealloc, the disconnect operation occurs normally, and it
appears that the "garbage collection" autoreleases the object. Is this OK?
Seems kinda sloppy. Any suggestions?
Best regards,
Matt
_______________________________________________
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