Using threads for audio computing?

lgabiot lgabiot at hotmail.com
Mon May 12 01:54:24 EDT 2014


Le 12/05/14 07:41, Chris Angelico a écrit :
>
> The GIL is almost completely insignificant here. One of your threads
> will be blocked practically the whole time (waiting for more samples;
> collecting them into a numpy array doesn't take long), and the other
> is, if I understand correctly, spending most of its time inside numpy,
> which releases the GIL. You should be able to thread just fine.
>
> ChrisA
>
Thanks Chris for your answer.

So back to my original question: A Queue and two threads 
(producer/consumer) seems a good answer to my problem, or is there a 
better way to solve it?
(again, I'm really a beginner, so I made up this solution, but really 
wonder if I do not miss a well known obvious much better idea).



More information about the Python-list mailing list