Fix hanging processes for good #69

This commit is contained in:
Robbert van der Helm
2020-12-11 12:40:50 +01:00
parent 2615da51da
commit c306048988
3 changed files with 15 additions and 6 deletions
+9 -3
View File
@@ -85,9 +85,15 @@ main(int argc, char* argv[]) {
Win32Thread dispatch_handler([&]() {
bridge->handle_dispatch();
// When the sockets get closed, this application should terminate
// gracefully
main_context.stop();
// // When the sockets get closed, this application should
// // terminate gracefully
// main_context.stop();
// FIXME: So some of the background threads spawned by the plugin may
// get stuck if the host got terminated abruptly. After an entire
// day of debugging I still have no idea whether this is a bug in
// yabridge, Wine, or those plugins, but just killing off this
// process and all of its threads 'fixes' the issue. #69
TerminateProcess(GetCurrentProcess(), 0);
});
// Handle Win32 messages and X11 events on a timer, just like in