1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00
Files
godot/core/templates/rid_owner.h
Juan Linietsky 08947d366f Make RID_Owner lock-free for fetching.
This PR makes RID_Owner lock free for fetching values, this should give a very
significant peformance boost where used.

Some considerations:

* A maximum number of elements to alocate must be given (by default 256k).
* Access to the RID structure is still safe given they are independent from addition/removals.
* RID access was never really thread-safe in the sense that the contents of the data are not protected anyway. Each server needs to implement locking as it sees fit.
2024-09-25 15:05:24 -03:00

13 KiB