Posts

Showing posts with the label asynchronous

Gateway to Multithreading in iOS with GCD and OperationQueue

Image
This article revolves around api’s available in swift for achieving concurrency and advanced thread handling techniques. Before we jump-in, it is better to brush-up few basics understandings of concurrent programming lets start with concurrent vs parallel running of jobs... Concurrency vs Parallelism  Concurrency   means executing multiple tasks at the same time but not necessarily simultaneously . Parallelism is when multiple tasks OR several part of a unique task literally run at the same time, e.g. on a multi-core processor. Parallelism must require hardware with multiple processing units. In single core CPU, you may get concurrency but NOT parallelism. more on concurrency and parallelism Task / work item /  block  Piece of code/task which needs to executed  Process  A process is the instance of a computer program that is being executed by one or many threads Processor  The hardware within a computer that executes a program Threads   A th...