• 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: cocoa-dev digest, Vol 1 #388 - 15 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 1 #388 - 15 msgs


  • Subject: Re: cocoa-dev digest, Vol 1 #388 - 15 msgs
  • From: Miguel Morales <email@hidden>
  • Date: Mon, 13 Aug 2001 11:33:13 -0700

Dear Kub,

I think you have stumbled upon the following issue: DO network connections and registration need to be done in the thread in which the object will run. The reason is that network connections are registered and handled by the current run loop - where current means whatever run loop was current when the connections are set up. So if I create a connection in for myObject in thread 0, and then break it off to run in thread 1, all network calls are handled by thread 0. If thread 0 is in a run loop it almost works, but the timing is very screwy because network calls keep waiting for thread 0 to run. If thread 0 is not in a run loop (waiting for thread 1 to finish processing?), then the calls never do get handled properly. So the moral to the story is when doing DO with multiple threads always set up network connections AFTER you have broken out the new thread, this way the network connections are handled by the correct run loop.

-Miguel


  • Prev by Date: questions
  • Next by Date: Re: Selecting objects, help needed...
  • Previous by thread: Re: questions
  • Next by thread: Re: Selecting objects, help needed...
  • Index(es):
    • Date
    • Thread