[Bug 706553] context creation is not thread safe

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Sep 2 02:30:04 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=706553
  GStreamer | gst-plugins-gl | git

--- Comment #8 from Sebastian Dröge (slomo) <slomo at circular-chaos.org> 2013-09-02 09:29:59 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)

> > > 2. add support for submitting functions before the main loop has started and
> > > run them at the beginning of the loop.  GMainLoop allows this.  Would require a
> > > gst_gl_window_send_message_async that doesn't wait for completion.
> > 
> > Can we make them async without waiting for completion at all?
> 
> With GMainContext? yes, simply call g_main_context_invoke.  With cocoa, you
> would do performSelector:@selector(funcname) onThread:thread_id withObject:arg
> waitUntilDone:NO.  That may break the autorelease pool alloc/release idiom we
> currently use though :/.

No I meant if the callers of send_message() currently require invocation to be
synchronous or if we can easily make them async.

> > > 3. add api so that we can say 'yes we are going to run you really soon so you
> > > should buffer all functions you get and run them in the loop later'
> > > 4. spinlock by calling gst_gl_window_send_message with a function that changes
> > > some value that we check.
> > 
> > Instead of a spinlock you can always use a GCond.
> 
> We are using a GCond and its not working :)

That was my point :) If we can't make it working with a GCond a spinlock won't
make it work either.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list