#include <include/flecs.h> FLECS_API ecs_record_t * ecs_write_begin(ecs_world_t *world, ecs_entity_t entity)
Begin exclusive write access to entity. This operation provides safe exclusive access to the components of an entity without the overhead of deferring operations.
When this operation is called simultaneously for the same entity more than once it will throw an assert. Note that for this to happen, asserts must be enabled. It is up to the application to ensure that access is exclusive, for example by using a read-write mutex.
Exclusive access is enforced at the table level, so only one entity can be exclusively accessed per table. The exclusive access check is thread safe.
world- The world.
entity- The entity.
- A record to the entity.