sschmid / Entitas

Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MIT License
7.03k stars 1.11k forks source link

Does entitas support multithreading ? #984

Closed genaray closed 1 year ago

genaray commented 2 years ago

Hi,

im looking for an well designed c# ecs which supports multithreading. Its for my game server and i dont want to use unity itself as a server.

So i found entitas and wanna know if it already supports multithreading somehow. Is there already a build in multithreading/jobs/scheduling system for entitas ?

Cheers

Guendeli commented 2 years ago

Entitas is plain C# code and not bound by UnityEngine api, and thus can run in a separate thread.

For instance you can run features/systems that belong to a specific context in a separate thread, while your client/render features/systems that rely on UnityEngine run on the main thread

eddy1001-555 commented 2 years ago

[URL=https://runaway3d.com/]run 3[/URL] I really like it but I haven't studied it as well as you

eddy1001-555 commented 2 years ago

runaway3d.com/]run 3[/URL] I really like it but I haven't studied it as well as you

sschmid commented 1 year ago

@genaray The core of Entitas uses System.Collections.Generic and is not thread-safe in general. However, within systems you can do multithreading, see

Ignore the if (exception != null) from the TestJobSystem, as it's only used fo the purpose of an unit test