Re: [linux-audio-user] Python & ALSA --- documentation

From: Rob Fell <robin.fell2@email-addr-hidden>
Date: Fri Aug 05 2005 - 12:08:31 EEST

Peter Brinkmann wrote:

> I always found it sufficient to do any thread synchronization on the
> Python side, using the synchronization primitives provided by Python's
> threading module. Do you have an application in mind that would require
> synchronization at a lower level?

I'm considering using conventional thread-programming techniques, but
that always gets a little messy (although I may be in need of further
practice). I'd hoped to make the threads explicitly synchronous via
queues thus forcing all of the locking out of the class objects and into
the queues joining them. Then I'd hoped to wrap the queues to make
debugging the deadlocks a little easier :)

You probably shouldn't consider this a feature request yet.

> Also, what sort of functionality would you like to implement by polling
> Python Queues in the MIDI thread?

I planned to consume events from the GUI thread periodically - this
would allow the MIDI thread to operate unhindered by the GUI if there's
a lot of work to do.

Background: I'm creating a guitar rack - my app. would live between a
control surface and JackRack, and be controlled (aka patch selection)
via either footswitch or GUI. I intend to add facilities for grouping
of patches into 'songs', and even arranging songs into 'gigs' for
mouse-free live use. That's why I'm trying to avoid potentially
stalling the MIDI thread....

The problem may be that I don't know the right idioms for doing this in
Python yet, but I haven't found anything worthy of study yet.

Thanks
Rob
Received on Fri Aug 5 16:15:05 2005

This archive was generated by hypermail 2.1.8 : Fri Aug 05 2005 - 16:15:05 EEST