• 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: Is there only one CFRunLoopRun which can implement in one process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there only one CFRunLoopRun which can implement in one process


  • Subject: Re: Is there only one CFRunLoopRun which can implement in one process
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 17 May 2009 06:53:44 -0500

On May 17, 2009, at 12:04 AM, Chris Gardner wrote:

I have created two thread, and in each thread I call CFRunLoopRun function to download file from FTP server.

It should not be necessary to create two threads. The whole point of run loops is that they manage multiple asynchronous input sources, allowing your program to process events from any of them as they occur. It should be possible to manage multiple simultaneous FTP downloads at once from your program's main thread.


That said, what API are you using to perform the FTP downloads? Running the run loop is part of the basic infrastructure. It doesn't have anything to do with FTP downloads, specifically. You must be using some other API built on top of a run loop, right? It may be best to show your code.


Can the CFRunLoopRun function implement in two PROCESS, but not in two THREAD.

It is possible to have two threads within the same process, each running their own run loop. The two will run independently and are capable of processing input sources simultaneously.


If you're seeing your FTP downloads being serialized, then it's due to something else. The problem isn't a limitation of run loops.

Regards,
Ken

_______________________________________________

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


  • Follow-Ups:
    • RE: Is there only one CFRunLoopRun which can implement in one process
      • From: Chris Gardner <email@hidden>
    • RE: Is there only one CFRunLoopRun which can implement in one process
      • From: Chris Gardner <email@hidden>
References: 
 >Is there only one CFRunLoopRun which can implement in one process (From: Chris Gardner <email@hidden>)

  • Prev by Date: Re: microsoft file formats in cocoa
  • Next by Date: refreshObject throws for object no longer in database
  • Previous by thread: Is there only one CFRunLoopRun which can implement in one process
  • Next by thread: RE: Is there only one CFRunLoopRun which can implement in one process
  • Index(es):
    • Date
    • Thread