When to Semaphore vs Dispatch Group! Careful Multithreaded Shared Resource

Profile Picture
- Published on Apr 26, 2019馃審 Public

Shared resources are often used across many different tasks in a multithreaded iOS application. If you want to make sure that a share resource is not accessed at the same time, you can guarantee the behavior through a Semaphore. However if your tasks are independent of one another, then using a Dispatch Group is probably the way to go. AppStore JSON APIs https://www.letsbuildthatapp.com/cour... Tinder Firestore Swipe and Match https://www.letsbuildthatapp.com/cour... Twitter Slide Out Menu Course https://www.letsbuildthatapp.com/cour... Podcasts Course https://www.letsbuildthatapp.com/cour... Intermediate Training Core Data https://www.letsbuildthatapp.com/cour... Instagram Firebase Course https://www.letsbuildthatapp.com/cour... Facebook Group https://www.facebook.com/groups/12406... Completed Source Code https://www.letsbuildthatapp.com/cour... Instagram: https://www.instagram.com/buildthatapp/ Twitter: https://twitter.com/buildthatapp Hackintosh Build i9 9900k: https://amzn.to/2CvQj6v ASUS Z390 Motherboard: https://amzn.to/2JpaQ2B 16GB Corsair Vengeance RGB RAM: https://amzn.to/2YbygvJ Corsair H100i Platinum Water Cooler: https://amzn.to/2FnbM22 Thermaltake RGB Power Supply: https://amzn.to/2TgKDTu Intel 1TB SSD: https://amzn.to/2Tkdk1V Corsair 280x Computer Case: https://amzn.to/2WcjvH2 AMD Radeon 4GB RAM GFX Card: https://amzn.to/2TYMyAp LG 34" Widescreen 3440 x 1440: https://amzn.to/2Tk7q0S Rode NT1 Microphone: https://amzn.to/2TZgX1r Focusrite Audio Interface: https://amzn.to/2U12gey Panasonic GH4 DSLR: https://amzn.to/2U4BrG6 Magewell HDMI to USB3 Capture Card: https://amzn.to/2Jp2esI