ultraq / redhorizon

Recreating the original 2D Command & Conquer games
Apache License 2.0
6 stars 4 forks source link

Allow for non-blocking events #42

Closed ultraq closed 3 years ago

ultraq commented 3 years ago

The current event system is built in such a way that event listeners can slow down execution of event producers. This is mostly desirable where the thread has the context to some resource like with OpenGL where you can't perform OpenGL calls without a current context and you don't want to have to be context switching all the time, but for other systems a non-blocking event would be really good and make much more use of multi-core systems.

ultraq commented 3 years ago

This is now added to the event system and used for a handful of events