EngoEngine / ecs

A Go-implementation of the Entity-Component-System paradigm
MIT License
298 stars 43 forks source link

Race Conditions detected on the World struct #32

Closed edoardo849 closed 11 months ago

edoardo849 commented 6 years ago

When I build the game using the -race flag:


go build -race main.go

and run it on a different goroutine (I'm using a server to add entities to the World) the compiler detects race conditions.

This PR adds an RWMutex to the ecs package to sync the state of the world