[Icecast-dev] Updated version of patch
toots at rastageeks.org
Wed Sep 10 02:35:10 PDT 2008
Le Wednesday 10 September 2008 10:53:47, vous avez écrit :
> >Why would you keep a non-thread safe API ?
> I do not want to touch libshout. I am only concerned
> with the python bindings.
> Probably Brendan can answer this better but I think
> libshout is not thread safe for simultaneous accesses
> to a shout_t object. This is not a problem
> as the posix locking primitives are trivial to use.
> For python apis should in principle be absolutely
> thread safe. This is mostly achieved through the GIL but
> in blocking functions it is necessary to release the GIL.
Yes, so we agree, perhaps I misunderstood your initial mail.
Usually, functions that requires acessing a shared ressource, either block the
processing until the ressource is released, or immediately return, indicating
the failure, much like lock and try_lock for mutexes, that's what I meant.
More information about the Icecast-dev