0
0
forked from blender/blender
The official Blender project repository.
Go to file
Bastien Montagne 9859622a66 BKE_reports: make the API thread-safe.
This commit makes using (most of) `BKE_report` API safe in
multi-threaded situation.

This is achieved by adding a `std::mutex` lock to the `ReportList`
struct (in a slightly convoluted way unfortunately, due to this being a
DNA struct). This lock is then used to make most operations on
`Reportlist` data thread-safe.

Note that while working on this, a few other minor issues aroze in
existing usages of Reportlist by the WM code, mainly the fact that
`wm_init_reports` and `wm_free_reports` were both useless:
  - init was called in a context where there is not yet any WM, so it
    was doing nothing.
  - free was called on a WM that would be later freed (as part of Main
    freeing), which would also call cleanup code for its `reports` data.
Both have been removed.

Further more, `wm_add_default` (which is the only place where a WM ID is
created) did not initialize properly it reports data, this has been
fixed.

This change is related to the wmJob thread-safety tasks and PRs (#112537,
!113548).

Pull Request: blender/blender#113561
2023-10-13 11:29:59 +02:00
.gitea
.github
build_files
doc
extern
intern Vulkan: Add Viewport Array/Layer Workarounds 2023-10-13 10:40:11 +02:00
locale
release
scripts Merge branch 'blender-v4.0-release' 2023-10-13 17:32:48 +11:00
source BKE_reports: make the API thread-safe. 2023-10-13 11:29:59 +02:00
tests
tools
.clang-format
.clang-tidy
.editorconfig
.git-blame-ignore-revs
.gitignore
AUTHORS
CMakeLists.txt
COPYING
GNUmakefile
make.bat
pyproject.toml
README.md

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.