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;
Late events can be handled on a group bases, in a configurable manner:
Handle late events ASAP, disregarding groups (current behavior)
Delay the whole group, preserving relative timing
Cancel the whole group
If we implement cancel, update, repeat or similar operations on pending events, we can have those operations apply to whole groups, database transaction style, guaranteeing that an operation will either be performed in full on all events in the group, or the whole operation is cancelled or unrolled.
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.
This is really a great sounding software synthesizer for use in games. Your demos were great too. I'd use it if i could be as productive with my own projects It's much appreciated!
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.