Pour obtenir une clé
d'essai remplissez le formulaire ci-dessous
Demandez des tariffs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
RUB
* En cliquant sur ce bouton, vous acceptez notre politique de confidentialité

Free PVS-Studio license for Microsoft MVP specialists
To get the licence for your open-source project, please fill out this form
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

I am interested to try it on the platforms:
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Race condition

Race condition

26 Déc 2011

Race condition. Another name: data race. A programming error in a multitask system when the system's work depends on the order in which code sections are executed. Race condition is a classical Heisenbug. Race condition occurs when several threads of a multithread application try to simultaneously get access to the data, meanwhile at least one thread performs saving. Race condition can lead to unpredictable results and they are often difficult to detect. Sometimes race condition's consequences occur only after a large period of time and in some other part of the application. Besides, such errors are very difficult to reproduce. To avoid race condition, synchronization methods are used allowing you to properly arrange operations executed by different threads. Here is an example. Assume one thread execute operation x = x + 3 over a shared variable x, while another thread executes operation x = x + 5. These operations for each thread are actually divided into three separate suboperations: to read x from memory, to increase x and then write x in memory. Depending on mutual order of suboperations executed by the threads the final value of x variable can excess the original one by 3, 5 or 8.

References

Comments (0)

Next comments
Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter