• 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
How to implement "while there are objects in the array - run runloop" idea?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to implement "while there are objects in the array - run runloop" idea?


  • Subject: How to implement "while there are objects in the array - run runloop" idea?
  • From: Nick <email@hidden>
  • Date: Thu, 26 May 2011 20:56:46 +0300

Hello
Could you please give me an idea how to implement this task?

I have a custom (not main) thread, that adds objects to an NSArray at random
times.
I have an another thread (main thread) that has to retrieve these objects
and do something with them (extract some properties from the retrieved
object and make an NSURLConnection's asynchronous connection).

Is there any way to make the RunLoop (after it has processed all
NSUrlConnection's asynchronous things)  check, if there are some objects in
my NSArray queue, and if there are - to initiate new NSURLConnections, if
there are not, and if there are no other events pending, just 'block', as
the runloop always does?

Or, if there is no way to do this using the runloop itself, what would be
the most natural way to solve such a task? I am stuck at this.
Thank you!
_______________________________________________

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: How to implement "while there are objects in the array - run runloop" idea?
      • From: Jens Alfke <email@hidden>
    • Re: How to implement "while there are objects in the array - run runloop" idea?
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Duplicate records adding to an NSTableView + NSArrayController
  • Next by Date: Drawing an arc fill inside an image
  • Previous by thread: Duplicate records adding to an NSTableView + NSArrayController
  • Next by thread: Re: How to implement "while there are objects in the array - run runloop" idea?
  • Index(es):
    • Date
    • Thread