Reporting a bug for this because manipulating images is a really important part of scripting, and handling the multi-threading is so even more. It's not possible to figure out how and when to use these as there s no docs.
Dmitry, could you please take an hour or so and write some documentation on how the various locking functions should be used. It's fine to do that from a C++ point of view.
Closed in: https://commits.kde.org/krita/1192c8b5f1a54334b6fa58f486613b0f03f862e0
Git commit 1192c8b5f1a54334b6fa58f486613b0f03f862e0 by Dmitry Kazakov. Committed on 21/02/2018 at 13:52. Pushed by dkazakov into branch 'master'. Add APIDOX to the methods of KisImage M +141 -28 libs/image/kis_image.h https://commits.kde.org/krita/1192c8b5f1a54334b6fa58f486613b0f03f862e0