After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 398783 - Timeouts are not thread-safe
Timeouts are not thread-safe
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
0.15.x
Other All
: Normal critical
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on: 398862
Blocks:
 
 
Reported: 2007-01-20 17:54 UTC by Chris Wilson
Modified: 2017-07-29 19:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Wilson 2007-01-20 17:54:31 UTC
Any gtk+ operation within a timeout should be wrapped with GDK_THREADS_{ENTER,LEAVE} (the same go for signals handlers as the client may do it's own gtk+ operations) - this effectively means all timeouts should be so wrapped.

Gtk+2.12 has the addition of gdk_threads_add_{idle,timeout} which automatically wraps the dispatch function with GDK_THREADS_{ENTER,LEAVE} *and* handles the race condition between signal emission and object destruction. Unfortunately, gtk+2.12 is the future [but not too distant].

Should we, at that time, up the minimum require version of Gtk+ (and glib) and fixup all the obsolete code and implement all the pending features that depend upon a more recent Gtk+?
Comment 1 Behdad Esfahbod 2007-01-20 20:20:50 UTC
I don't have any problem with waiting for gtk 2.12 and then requiring it.
Comment 2 Chris Wilson 2007-02-04 22:07:27 UTC
Having moved the display/process timeouts from per-terminal to a global the major thread-safety issues are already addressed.

Which leaves the cursor blink timeout. 
Comment 3 Christian Persch 2008-11-22 13:48:37 UTC
If we used gdk_threads_add_*, then in process_timeout and update_repeat_timeout, the "if (again)... " code blocks would be inside the GDK_THREADS_ENTER/LEAVE block, while they're currently outside of them...
Comment 4 Behdad Esfahbod 2008-11-29 06:13:04 UTC
What's the conclusion here?
Comment 5 Behdad Esfahbod 2017-07-29 17:14:50 UTC
Obsolete?
Comment 6 Christian Persch 2017-07-29 19:04:41 UTC
Yes, obsolete, esp since gdk_threads_enter/leave are deprecated. Also, vte doesn't use threads anyway.