diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-19 20:53:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-19 20:53:44 +0300 |
commit | adc43ff43ffabb7d14962e35abcf0d05eabafa0c (patch) | |
tree | a3bba07448f8db7ad52cf8aeb72b40341c4073df /source/blender/editors/space_file | |
parent | 7fd4ad448c9db2454af0702b69b03f6626e9e6ac (diff) | |
parent | 6e90294e08be01788112c883ed3dc8fc01eaaee8 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 8e548d7a9bd..d94aad640b7 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1116,7 +1116,10 @@ static void filelist_cache_preview_runf(TaskPool *__restrict pool, void *taskdat preview->img = IMB_thumb_manage(preview->path, THB_LARGE, source); IMB_thumb_path_unlock(preview->path); - preview->flags = 0; /* Used to tell free func to not free anything! */ + /* Used to tell free func to not free anything. + * Note that we do not care about cas result here, + * we only want value attribution itself to be atomic (and memory barier).*/ + atomic_cas_uint32(&preview->flags, preview->flags, 0); BLI_thread_queue_push(cache->previews_done, preview); // printf("%s: End (%d)...\n", __func__, threadid); |