Wednesday, August 2, 2023
HomeProgrammingConcurrency by Tutorials | Kodeco

Concurrency by Tutorials | Kodeco


This e book is for intermediate iOS builders who already know the fundamentals of iOS and Swift
improvement however wish to discover ways to make their app effectively carry out duties with out
affecting efficiency, and easy methods to correctly divide work to make the most of {hardware} to the fullest extent.

  • Grand Central Dispatch
  • Operations & Operation Queues
  • Frequent Concurrency Issues
  • Threads & Thread Sanitizer

Dive Into Concurrency in Your iOS Apps!

What’s concurrency, and why would you even wish to use it in your apps? Discover out every thing it is advisable to know on this e book. Study Grand Central Dispatch, Apple’s implementation of C’s libdispatch, also referred to as GCD — one of many…


extra

This part tells you a number of issues it is advisable to know earlier than you get began, comparable to what you’ll want for {hardware} and software program, the place to search out the venture information for this e book and extra.

On this a part of the e book, you’re going to be taught concerning the fundamentals of Concurrency. You’re going to be taught what it’s, what sort of issues it solves and when and the way you’ll use it.

Moreover, you’ll be taught the fundamental items which comprise Concurrency in iOS improvement: Grand Central Dispatch and Operations.

This part will offer you foundational information concerning Concurrency, so make sure to learn it by way of! The upcoming sections will dive a lot deeper into every of those ideas individually.

Get a fast overview of what concurrency is and why you may wish to use it.

Concurrency might be dealt with by both Grand Central Dispatch (GCD) or Operations. Study concerning the variations.

On this part, you’ll take a deep dive into Apple’s hottest and easy-to-use mechanism to put in writing and handle concurrent duties — Grand Central Dispatch. You’ll discover ways to make the most of queues and threads to regulate the execution of duties in your app, in addition to easy methods to group these duties collectively. You’ll additionally study frequent pitfalls and risks of utilizing concurrency, and how one can keep away from them.

This chapter teaches you easy methods to use a GCD queue to dump work from the principle thread. You may additionally be taught what a “thread” is.

Within the earlier chapter you realized about how queues work. On this chapter you will develop that information to discover ways to submit a number of duties to a queue which must run collectively as a “group” with the intention to be notified after they have all accomplished. You may additionally discover ways to wrap an present API with the intention to name it asynchronously.

By now you know the way GCD could make your app a lot sooner. This chapter will present you a few of the risks of concurrency should you’re not cautious, and easy methods to keep away from them.

Although Grand Central Dispatch offers a lot of the concurrency capabilties you’ll want proper out-of-the-box, generally you’ll need some further customizability. That is the place Operations come into play. This part will educate you about Operations, Operation Queues and every thing in between.

On this chapter you will change gears and begin studying concerning the Operations class, which permits for far more highly effective management over your concurrent duties.

Just like the Dispatch Queues you realized about again in Chapter 3, the Operation class makes use of an OperationQueue to carry out an identical operate.

Now you could create an Operation and submit it to a queue, you will discover ways to make the operation itself asynchronous. Whereas not one thing you will do recurrently, it is vital to know that it is doable.

The “killer characteristic” of Operations is having the ability to inform the OS that one operation relies on one other and should not being till the dependency has completed.

There are occasions when it is advisable to cease an operation that’s operating, or has but to begin. This chapter will educate you the ideas that you simply want to concentrate on to help cancelation.

To wrap up this e book, this part might be devoted to displaying you ways you should use the information you’ve amassed all through this e book for real-life functions.

On this part, you’ll take a deeper dive into a standard case the place concurrency performs an enormous function — Core Knowledge — in addition to study Apple’s Thread Sanitizer, an excellent device to debug and resolve concurrency points and confusions.

Core Knowledge works properly with concurrency so long as you retain a number of easy guidelines in thoughts. This chapter will educate you easy methods to make it possible for your Core Knowledge app is ready to deal with concurrency correctly.

Knowledge races happen when a number of threads entry the identical reminiscence with out synchronization and at the least one entry is a write. This chapter will educate you easy methods to use Apple’s Thread Sanitizer to detect information races.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments