[Cs-dev] Python API Threads
Date | 2011-07-12 15:30 |
From | thorin kerr |
Subject | [Cs-dev] Python API Threads |
Attachments | None None |
HI there, I'm running Csound version 5.13 (float samples) Jan 17 2011 on Mac OS 10.5 Am I cleaning up Csound instances properly?
After calling Stop() and Cleanup() on a Csound object, I'm still left with one more thread than I'd have thought ought to be running. For example, after running this bare-minimum script, my Activity Monitor reports Python is running 2 threads.
(note the use of the python -i flag to keep the interpreter alive) Why does the second thread still exist, and what is it doing? --------- #! /usr/bin/env python -i
import csnd csound = csnd.CppSound() csound.setPythonMessageCallback() csound.setOrchestra(""" sr = 44100 ksmps = 10 nchnls = 1 endin
""") csound.setScore("f0 100") csound.setCommand("csound -odac -d /tmp/tmp.orc /tmp/tmp.sco") csound.exportForPerformance() csound.compile()
csound.Stop() csound.Cleanup() Thorin |