Revision 30ee2f9...

Go back to digest for 8th January 2012

Other in Office

Dmitry Kazakov committed changes in [calligra] /image:

Removed blocking signals from the KisImageSignalRouter

Currently, there is a quite annoying limitation: we cannot add/remove/move
layers from the context of the scheduler's thread. We can do it only from
the UI thread. It means that the actions, which work with nodes' position
should work using legacy undo adapter.

Here is an explanation of the problem
(from KisImageSignalRouter::emitAboutToAddANode):

Some of the users of our signals rely on the fact that the
signals are emitted synchronously from the same thread. Such
users are KisNodeModel, KisShapeController. They request the
data of the signal right from the node data, so these signals cannot
be emitted asynchronously. We cannot use BlockingQueued
connections here, because the we'll get a deadlock when UI
will decide to wait for scheduler to finish it's job.
That is why we explicitly check that no nodes are added,
removed or moved from the context of the scheduler thread.
Currently we have no other way than to assert in such a case.
So all the node modifications should be done using legacy
undo adapter, in the context of the UI thread.

File Changes

Modified 2 files
  • /image
  •   krita/kis_image_signal_router.cpp
  •   krita/kis_image_signal_router.h
2 files changed in total