• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Threading problem using AsyncSocket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Animating a view along a path
  • Next by Date: Re: Making a bound view re-read its value
  • Previous by thread: RE: Threading problem using AsyncSocket
  • Next by thread: RE: Threading problem using AsyncSocket
  • Index(es):
    • Date
    • Thread