-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Linux] Run functions on GLib event loop in a sync way (#25916)
* Run functions on GLib event loop in a sync way * Include invoke sync template when GLib is enabled * Restore workaround for TSAN false positives * Fix variable shadowing * Do not use g_main_context_invoke_full for waiting for loop to start The g_main_context_invoke_full() function checks whether the context, on which it's supposed to run callback function, is acquired. Otherwise, it runs given callback on the current thread. In our case this may lead to incorrect GLib signals bindings, so we have to use g_source_attach() when waiting for main loop. * Release context object after joining glib thread TSAN can report false-positive on context unref. By firstly joining thread and later unreferencing context we will prevent such warning.
- Loading branch information
Showing
5 changed files
with
118 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.