Day 18/100 100 Days of Code
Concurrency is a feature that is not aimed at beginner developers. It is important to understand it properly as it can be very confusing and cause problems that might be difficult to understand.
I hit a brick wall during the development of Info Hunter due to my limited understanding of concurrency.
So, I spent the session watching a tutorial about mutex which is an object that can be used to control the flow of the multithreaded operation in critical sections.
A thread "locks" or "unlocks" sections that are critical to an operation. This means that data that is shared between threads won't be used by all the threads at the same time. Each thread will wait until the previous thread completes its operations.
Special thanks to CppNuts for the great tutorials on multithreading.
Subscribe to my newsletter
Read articles from Chris Douris directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Chris Douris
Chris Douris
AKA Chris, is a software developer from Athens, Greece. He started programming with basic when he was very young. He lost interest in programming during school years but after an unsuccessful career in audio, he decided focus on what he really loves which is technology. He loves working with older languages like C and wants to start programming electronics and microcontrollers because he wants to get into embedded systems programming.