Hi there! I have run into a problem that I just don’t seem to be able to slve,
When I run the ttone() function directly it behaves as it should. However if I run it in a fork() then only the first print happens and then the program hangs. Anyone have any idea why?
Thanks Example4.py (688 Bytes)
BTW would a function like wait_for_clock_to_finish() a good idea? You could use that to wait for a forked process to finish (fork() does return a clock doesn’t it?) to start another process while some running processes are still going.
You mean, wait for a specific clock to finish? You know, I’ve been wondering about that. It’s not a bad idea!
I haven’t put it in an official release yet I think, but I did recently give fork an argument called done_callback that takes a function to call when the clock finishes. But maybe wait_for_clock_to_finish() is better.