how many threads is too many in iphone/objective-c dev -


i have complex sync job several asyncronous calls content on http. each time content received, asks next bit , on. these daisey-chained in big over-all sync job data on server.

there 12 steps in job chain. seems stuck after around 5th async request, request never comes , hangs ever waiting it. think may have many threads being spawned because if fire off 1 hangs @ at beginning returns fine.

in way imagine in head, main thread asks async content a. when comes in own asynchronous time spawns new thread asks aync content b. when comes in own sweet time spawns new thread asks content c. isn't new thread being created everytime async request returns result?

am daisy-chaining these requests right? quite @ threads in java development i'm bit confused on how work in obj-c. need use thread pool of 3 threads , reuse these?

sorry high-level question i'm sure experts can clear cloud of mystery around this.

nsoperationqueues built on top of grand central dispatch. if need precise control on order of operations , ability dispatch synchronous requests might want use gcd directly. using either, don't need worry thread creation/management. queue operations needed app.

the apple docs fine on imho can find number of tutorials out there.

[edit: added link apple docs]

http://developer.apple.com/library/ios/#documentation/general/conceptual/concurrencyprogrammingguide/introduction/introduction.html


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -