On 2013-02-14 17:20:26 -0800, Alexander Strange wrote:
> On Thu, Feb 14, 2013 at 2:12 PM, Janne Grunau <[email protected]> wrote:
> > On 2013-02-13 19:48:32 +0100, Anton Khirnov wrote:
> >> [...]
> >
> > Are you sure the last part is true? It's probably true since we have to
> > guarantee that get_buffer is always called before finish_setup for
> > non-thread safe callbacks but it seems to be an odd and unecessary
> > limitation. Who writes thread-safe but not reentrant safe functions?
> 
> It's not a limitation, but it does free clients from auditing their
> existing code.

A limitation for us

> A callback that manipulates global data without using locks isn't
> reentrant, but as long as it doesn't use thread-local data it's OK to
> call it from a secondary thread. The main thread is blocked in
> pthread.c at that point so no races occur.

I would have to look a pthread.c to be sure that the main thread will
be locked there. I assumed a multithreaded client which would probably
need locking for any global data it could use in get_buffer2 anyway.

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to