Diffusion Krita eaf421ab7e22

Fix a crash and a hangup caused by threading issues in KisUpdateJobItem

Authored by dkazakov on Oct 18 2017, 11:34 AM.

Description

Fix a crash and a hangup caused by threading issues in KisUpdateJobItem

The crash happened because of race condition over the previously used
m_isExecuting counter. It could happen that the job execution could be
entered twice by two different threads.

The hangup happened because of the race condition between m_isExecuting
and isRunning(). It could happen that no(!) thread will even start
execution on a given job item, which basically means that the queue will
just lose one thread. The hangup happens when all the threads are lost.

Now both counters are merged into a single atomic object, basically
eliminating race conditions over it.

Details

Committed
dkazakovOct 18 2017, 11:34 AM
Parents
R37:67eea20583cc: Implement showing brush performance log on canvas overlay
Branches
Unknown
Tags
Unknown