https://bugs.kde.org/show_bug.cgi?id=417233
Dmitry Kazakov <dimul...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REPORTED |RESOLVED Latest Commit| |https://invent.kde.org/kde/ | |krita/commit/45fa9fb936bb00 | |faa75865b8663d20bbb0785ea3 Resolution|--- |FIXED --- Comment #2 from Dmitry Kazakov <dimul...@gmail.com> --- Git commit 45fa9fb936bb00faa75865b8663d20bbb0785ea3 by Dmitry Kazakov. Committed on 06/02/2020 at 16:46. Pushed by dkazakov into branch 'master'. Fix possible deadlocks in KisShapeLayer and KisShapeLayerCanvas Using Qt::BlockingQueuedConnection is dangerous. The GUI thread may easily block on KisImage::barrierLock()/waitForDone() and the worker thread will become blocked in the deadlock. To overcome this issue KisBusyWaitBroker class was introduced. It tracks all the locks of KisImage and breaks the tie of the deadlock in favour of the worker thread, when needed. The code that runs in a context of a worker thread and needs to pass a blocking signal should utilize KisSafeBlockingQueueConnectionProxy class. It passes the signal in a safe way, breaking the tie with KisBusyWaitBroker if needed. M +1 -0 libs/global/kis_signal_compressor_with_param.cpp M +37 -4 libs/global/kis_signal_compressor_with_param.h M +2 -0 libs/image/CMakeLists.txt A +111 -0 libs/image/KisBusyWaitBroker.cpp [License: GPL (v2+)] A +71 -0 libs/image/KisBusyWaitBroker.h [License: GPL (v2+)] C +20 -2 libs/image/KisSafeBlockingQueueConnectionProxy.cpp [from: libs/global/kis_signal_compressor_with_param.cpp - 052% similarity] A +124 -0 libs/image/KisSafeBlockingQueueConnectionProxy.h [License: GPL (v2+)] M +9 -0 libs/image/kis_image.cc M +0 -2 libs/image/kis_legacy_undo_adapter.cpp M +11 -0 libs/ui/KisPart.cpp M +12 -6 libs/ui/flake/kis_shape_layer.cc M +2 -8 libs/ui/flake/kis_shape_layer.h M +3 -3 libs/ui/flake/kis_shape_layer_canvas.cpp M +2 -3 libs/ui/flake/kis_shape_layer_canvas.h https://invent.kde.org/kde/krita/commit/45fa9fb936bb00faa75865b8663d20bbb0785ea3 -- You are receiving this mail because: You are watching all bug changes.