Shared Structure
Closed this issue · 1 comments
alejzeis commented
Due to the nature of D, all mutable values are by default thread-local. The shared
modifier makes a value available to all threads.
What would be the best structure to share the correct values across threads, so a concurrent multithreading event system can be implemented?
List of items that need to be shared
:
- Model
- Textures
- Shaders
- GameManager
- Window
- Scene
- Model's
- Texture's
- Shader's
The event system will most likely need to access these members, and modify them if possible across threads. Methods are encouraged to synchronized(SyncLock lock)
code that accesses and modifies these variables.