[PD-dev] clocks & threads

Olaf Matthes olaf.matthes at gmx.de
Thu Dec 5 13:39:47 CET 2002

Thomas Grill schrieb:

> When oggcast crashes while it is running alone (with no other threaded
> externals around), this would mean that the main and child thread
> collide, wouldn't it? This should be solvable by a mutex inside your
> external.

Hi Thomas,

well, I have a mutex inside it! And I couldn't really reproduce these crashes
but removing the clock_delay() call from the child thread solved the problem.
Now it runs for weeks without crashing.
The function that is called by clock_delay() from the _main_ thread of course
locks the mutex before doing anything else.... (I actually call the same
function, just from the main thread instead).

> Concerning thread-safe PD... what functions do we want to be
> thread-safe?
> For my part, i really only need clock_set, since all other issues are
> handled by flext.

Yes, I think that would be enough. And it would be very cool! ;-)


More information about the Pd-dev mailing list