To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (an extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
USD
EUR
RUB
* By clicking this button you agree to our Privacy Policy statement

Free PVS-Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

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

Dec 26 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
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept