Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Walles <walles>2020-03-09 18:52:34 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-09 19:11:24 +0300
commit8bc8713beb8220cdac1475a2f8f99fda8c888b32 (patch)
tree2a816fa513a9578a7b6a28920d0962449d578591 /intern/cycles/util/util_progress.h
parent58e6306b1533ef0b4668079eaac6f14b82cef313 (diff)
Cleanup: avoid (harmless) race condition reported by Helgrind
Differential Revision: https://developer.blender.org/D7058
Diffstat (limited to 'intern/cycles/util/util_progress.h')
-rw-r--r--intern/cycles/util/util_progress.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h
index 379beaeeefa..23e49b4db7a 100644
--- a/intern/cycles/util/util_progress.h
+++ b/intern/cycles/util/util_progress.h
@@ -204,6 +204,8 @@ class Progress {
float get_progress()
{
+ thread_scoped_lock lock(progress_mutex);
+
if (total_pixel_samples > 0) {
return ((float)pixel_samples) / total_pixel_samples;
}