Bug 2314 - g_timeout_add thread safety
Summary: g_timeout_add thread safety
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: 2.x
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marius Ungureanu
Depends on:
Reported: 2011-12-02 10:44 UTC by Nicholas Frechette
Modified: 2017-06-15 01:30 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Nicholas Frechette 2011-12-02 10:44:32 UTC
I noticed that Application.Invoke doesn't seem to use a threadsafe
version of g_timeout_add. Is that correct??? Shouldn't it be using:
gdk_threads_add_timeout(...) or using an explicit lock (...) statement?
Application.Invoke is assumed to be used by multi-threaded applications so this
should be important. If it is a bug, I could open a separate ticket.
I presume other places make the same mistake (idle?).

Issue raised here: https://bugzilla.novell.com/show_bug.cgi?id=723148
Comment 1 Marius Ungureanu 2017-06-15 01:30:05 UTC
This has been fixed in recent versions of gtk# 2.12.