#include <include/flecs.h> FLECS_API bool ecs_enable_locking(ecs_world_t *world, bool enable)
Enable world locking while in progress. When locking is enabled, Flecs will lock the world while in progress. This allows applications to interact with the world from other threads without running into race conditions.
This is a better alternative to applications putting a lock around calls to ecs_progress, since ecs_progress can sleep when FPS control is enabled, which is time during which other threads could perform work.
world- The world.
enable- True if locking is to be enabled.
- The previous value of the setting.