[PD-dev] thread safety
Miller Puckette
mpuckett at imusic1.ucsd.edu
Thu May 14 22:57:05 CEST 2009
This is unsafe unless you obtain the "pd lock" (by calling sys_lock() and
sys_unlock()) around the whole block of code or else around each individual
binbuf call.
cheers
Miller
On Thu, May 14, 2009 at 11:14:49AM +0200, Torsten Curdt wrote:
> Hey there,
>
> I just would like to confirm.
>
> We are using this bit of code to talk to PD:
>
> t_binbuf *b = binbuf_new();
> binbuf_text(b, msg, strlen(msg));
> binbuf_eval(b, 0, 0, 0);
> binbuf_free(b);
>
> Question is whether that is safe to use from another thread or not.
> It seems like it is not.
>
> Can anyone confirm?
>
> cheers
> --
> Torsten
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
More information about the Pd-dev
mailing list