Currently the X11 backend spawns a new thread in order to spawn its own event loop and processes everything there.
This is done because on Linux there is no such thing as a global event loop (unlike Windows and macOS), so there is no standardized event loop for us to plug into.
The issue is that this forces a Send bound on the WindowHandler, which is only necessary for this workaround to work(Windows and macOS always keep everything on the main thread).
VST3 and CLAP now have support for either timer, or more ideally for watching any File Descriptor, and have the host call us back when any new event arrives on those. This allows us to indirectly plug into the host's event loop without blocking anything, and is how most (if not all?) plugins work in those formats.
We should augment the Host API to support timer and FD extensions, which would allow us to drop the Send bound and simplify quite a bit of code on the baseview side.
This however is a breaking change, not because of dropping the Send requirement, but because it will require all users to implement the new Host API.
Currently the X11 backend spawns a new thread in order to spawn its own event loop and processes everything there.
This is done because on Linux there is no such thing as a global event loop (unlike Windows and macOS), so there is no standardized event loop for us to plug into.
The issue is that this forces a
Sendbound on theWindowHandler, which is only necessary for this workaround to work(Windows and macOS always keep everything on the main thread).VST3 and CLAP now have support for either timer, or more ideally for watching any File Descriptor, and have the host call us back when any new event arrives on those. This allows us to indirectly plug into the host's event loop without blocking anything, and is how most (if not all?) plugins work in those formats.
We should augment the
HostAPI to support timer and FD extensions, which would allow us to drop theSendbound and simplify quite a bit of code on the baseview side.This however is a breaking change, not because of dropping the
Sendrequirement, but because it will require all users to implement the newHostAPI.