running functions

sjdevnull at yahoo.com sjdevnull at yahoo.com
Wed Nov 16 17:20:12 EST 2005


Gorlon the Impossible wrote:
> Hello
> I'm not sure how to phrase this question. I have a Python function
> that sends MIDI messages to a synth. When I run it, I of course have
> to wait until it is finished before I can do anything else with
> Python. Is it possible to run this function and still be able to do
> other things with Python while it is running? Is that what threading
> is about?

Threading's a good answer if you really need to share all your memory.
A multiprocess solution is probably preferrable, though it depends on
the architecture.

It may be possible to do it in a single process (if, say, the MIDI
synth supports waitForMultipleObjects, select, async I/O, or an
equivalent thereof) without blocking.




More information about the Python-list mailing list