On 4/02/2009 4:51 AM, Victor Lin wrote:
It may looks like this.

     void operator() (double time, const AudioData&data) {
         // acquire lock
         m_Function(time, data);
         // release lock
     }

You want something like:

      void operator() (double time, const AudioData&data) {
          PyGILState_STATE old = PyGILState_Acquire();
          m_Function(time, data);
          PyGILState_Release(old);

Note that Phillip is also correct; you will need to initialize threading if this is an app which embeds Python...

HTH,

Mark
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to