mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Handle incoming events from off-threads separately
On the Wine side we want to handle most events on the main UI thread. We'll assume any events coming in from a secondary socket are safe and can be handled directly.
This commit is contained in:
@@ -95,6 +95,12 @@ EventHandler::EventHandler(
|
||||
void EventHandler::connect() {
|
||||
if (acceptor) {
|
||||
acceptor->accept(socket);
|
||||
|
||||
// As mentioned in `acceptor's` docstring, this acceptor will be
|
||||
// recreated in `receive()` on another context, and potentially on the
|
||||
// other side of the connection in the case of `vst_host_callback`
|
||||
acceptor.reset();
|
||||
fs::remove(endpoint.path());
|
||||
} else {
|
||||
socket.connect(endpoint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user