[Webkit-unassigned] [Bug 115352] [gstreamer] Make sure gstreamer source element is thread-safe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 26 07:32:40 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=115352


Andre Moreira Magalhaes <andrunko at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #209473|0                           |1
        is obsolete|                            |
 Attachment #209473|review?                     |
               Flag|                            |
 Attachment #209653|                            |review?, commit-queue?
               Flag|                            |




--- Comment #41 from Andre Moreira Magalhaes <andrunko at gmail.com>  2013-08-26 07:32:04 PST ---
Created an attachment (id=209653)
 --> (https://bugs.webkit.org/attachment.cgi?id=209653&action=review)
Patch

(In reply to comment #40)
> (From update of attachment 209473 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=209473&action=review
> 
> > Source/WTF/wtf/gobject/GMutexLocker.h:36
> > +    inline explicit GMutexLocker(GMutex *mutex)
> 
> Misplaced * :)
>
Arg, fixed, strange that check-style didn't catch it :/.

> > Source/WTF/wtf/gobject/GMutexLocker.h:48
> > +            g_mutex_lock(m_mutex);
> 
> I wonder if instead of _lock here we could _try_lock and ASSERT on failure, would it make sense?
hmm, I don't think we want that actually. "trylock" would just return FALSE if the mutex is already locked by another thread instead of blocking. Quoting from gmutex docs:

  void g_mutex_lock (GMutex *mutex);
  Locks mutex. If mutex is already locked by another thread, the current thread will block until mutex is unlocked by the other thread.

  gboolean g_mutex_trylock (GMutex *mutex);
  Tries to lock mutex. If mutex is already locked by another thread, it immediately returns FALSE. Otherwise it locks mutex and returns TRUE.

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



More information about the webkit-unassigned mailing list