Tell about block and GCD



Tell about block and GCD..

Answer / babu

Block: Block objects are a C-level syntactic and runtime feature. Blocks are particularly useful as a callback because the block carries both the code to be executed on callback (on completion handler block) and the data needed during that execution.

GCD: GCD (Grand Central Dispatch) provides and manages FIFO queues to which your application can submit tasks in the form of block objects. Blocks submitted to dispatch queues are executed on a set of threads completely managed by the system. No guarantee is made as to the thread on which a task executes. GCD allows three kinds of queues:

Main: tasks execute serially on your application’s main thread

Concurrent: tasks are dequeued in FIFO order, but run concurrently and can finish in any order.

Serial: tasks execute one at a time in FIFO order

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

Introduction to iphone application development?

1 Answers  


Which are the ways of achieving concurrency in ios?

1 Answers  


What is cocoa framework in ios?

1 Answers  


What is grand central dispatch ios?

1 Answers  


Explain how an autorelease pool works at the runtime level

1 Answers  


Explain the difference between coredata & sqlite?

1 Answers  


Can we adjust the size of photos uploaded from the app?

1 Answers  


what are the controllers are available in objective C

1 Answers  


What are the location services?

1 Answers  


What are ibeacons in ios? : IOS Architect

1 Answers  


What is fast enumeration?

1 Answers  


How to start a thread?

1 Answers  


Categories