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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-10-08 15:46:01 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-10-08 15:51:33 +0300
commit0fe7446a308028545b7d0e73d797824bfc090c17 (patch)
tree41b5564afbcddc6a749acce12494b4a7be1c1dad /intern/ghost
parent0a2a006775543292786e8642b20a594771fdc81c (diff)
BLI_task: fix case were some pool could work in more threads than allowed.
We were checking for number of tasks from given pool already active, and then atomically increasing it if allowed - this is not correct, number could be increased by another thread between check and atomic op! Atomic primitives are nice, but you must be very careful with *how* you use them... Now we atomically increase counter, check result, and if we end up over max value, abort and decrease counter again. Spotted by Sergey, thanks!
Diffstat (limited to 'intern/ghost')
0 files changed, 0 insertions, 0 deletions