Run Pd on a stable thread and communicate via a channel