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 591438 - dfb_events_dispatch is not thread safe
dfb_events_dispatch is not thread safe
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: [obsolete] Backend: directfb
2.17.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
Michael Emmel
Depends on:
Blocks:
 
 
Reported: 2009-08-11 12:05 UTC by Carsten Behling
Modified: 2009-11-30 05:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Made dfb_events_dispatch thread save. (608 bytes, patch)
2009-08-11 12:14 UTC, Carsten Behling
committed Details | Review

Description Carsten Behling 2009-08-11 12:05:54 UTC
Steps to reproduce:
Run a multithreaded GTK+ app.


Stack trace:
Not necessary.

Other information:
Fix must be:

static void
dfb_events_dispatch (void)
{
  GdkDisplay *display = gdk_display_get_default ();
  GdkEvent   *event;

  GDK_THREADS_ENTER ();
  while ((event = _gdk_event_unqueue (display)) != NULL)
    {
      if (_gdk_event_func)
        (*_gdk_event_func) (event, _gdk_event_data);

      gdk_event_free (event);
    }

  GDK_THREADS_LEAVE ();
}
Comment 1 Carsten Behling 2009-08-11 12:14:49 UTC
Created attachment 140429 [details] [review]
Made dfb_events_dispatch thread save.
Comment 2 Matthias Clasen 2009-11-27 22:36:54 UTC
Comment on attachment 140429 [details] [review]
Made dfb_events_dispatch thread save.

Looks correct.
Comment 3 Javier Jardón (IRC: jjardon) 2009-11-30 05:09:28 UTC
Comment on attachment 140429 [details] [review]
Made dfb_events_dispatch thread save.

commit ee2c797e700ec933fafce48b405dda53fdb228da