[PD-dev] stack checking

Krzysztof Czaja czaja at chopin.edu.pl
Thu Jun 24 12:43:04 CEST 2004


thanks Thomas,

Thomas Grill wrote:
...
> There are the sys_lock and sys_unlock API functions that guarantee that a
> locked zone can only be active when PD is idle (is microsleep).

ok, I should have done my homework first...  still, I am not sure
the lock/unlock calls I can see in my copy of Pd scheduler are not
misplaced.  I think, all the external messages, like gui events
(mouse and keyboard), net receivers, pipes, etc., are being polled
into Pd via the microsleep routine, so they seem not to be locked
out by the other thread?

...
> In flext there's a message queue for all messages from non-PD threads or for

Forgive me, but I still do not understand it fully.  One thing,
simple and robust, is queuing messages, and arming a clock, for
dispatching them in the main thread.  However, if we are to
distribute message passing among different threads anyway, what is
to be gained, in the real world, by using the background dispatcher,
instead of each thread locking Pd when issuing its message?

Krzysztof





More information about the Pd-dev mailing list