Diffusion Krita 8852506e8ece

Rewrite for KoColorSpaceRegistry to fix multithreading and deadlocks

Authored by dkazakov on May 11 2017, 11:06 AM.

Description

Rewrite for KoColorSpaceRegistry to fix multithreading and deadlocks

Basically, we have two levels of locks in the registry:

  1. (outer level) is Private::registrylock, which controls the structures of the color space registry itself
  2. (inner level) is KoColorProfileStorage::Private::lock controls the structures related to profiles.

The locks can be taken individually, but if you are going to take both
of them, you should always follow the order 1) registry; 2) profiles.
Otherwise you'll get a deadlock.

All the dependent classes (KoColorConversionSystem and KoColorSpaceFactory)
now do not use the direct links to the registry. Instead, they use special
private interfaces that skip recursive locking and ensure we don't have
deadlocks.

Details

Committed
dkazakovMay 11 2017, 11:06 AM
Differential Revision
D5808: Rewrite for KoColorSpaceRegistry to fix multithreading and deadlocks
Parents
R37:53a506aa625c: Add -Werror=delete-incomplete
Branches
Unknown
Tags
Unknown