Grouped events #362
Labels
enhancement
Minor features, and improvements on existing functionality
feature
Entirely new features
multitdreading
Issues related to distributing work across CPU threads
Inspired by a gamedev problem I'm currently working on, I realize that it would be useful to declare events as related, so they can be managed in a way similar to database transactions. More specifically;
Since interface contexts can be considered stateful (current interfaces are created per thread, and a thread-safe implementation would rely on TLS, to the same effect), we can implement groups by adding methods along the lines of BeginGroup()/EndGroup(), where BeginGroup() switches event enqueuing to a local buffer, and EndGroup() finalizes and sends the group via a single event to the engine context. Thus, API can remain simple to use, with virtually no impact on synchronization, performance etc when using event grouping.
The text was updated successfully, but these errors were encountered: