Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Terry Coles
Ralph, I'm still struggling a bit (well a lot actually ;-) ). The problem is still how to get all the things done that I need to get done. In this message, I'll try to answer some of your questions that I've failed to address and raise a few more for you. On Friday, 24 February 2017 15:43:04

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Ralph Corderoy
Hi Terry, > I'm still struggling a bit (well a lot actually ;-) ). The problem is > still how to get all the things done that I need to get done. If you keep cycling back over the old emails as you learn more things, they may make more sense. :-) > There are a number of references in the code

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Ralph Corderoy
Hi Terry, > > > 2. Change Rings Control - The simplest function. It either plays the > > > > bell_player = None > > > > def start_bell_player(gpio): > > global bell_player > > How do these functions tie in with the GPIO.add.event.detect > statement. Also, what calls the

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Terry Coles
Cross-over :-) On Saturday, 25 February 2017 14:37:53 GMT Ralph Corderoy wrote: > > How do these functions tie in with the GPIO.add.event.detect > > statement. Also, what calls the function? > > They are the callbacks registered using GPIO.add_event_detect(). They > are called by the GPIO

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Ralph Corderoy
Hi Terry, > > but I'd be surprised if that works because foo's expecting no > > arguments, but one, the `gpio', is going to be passed in. > > Oh OK. The example on Alex Eames website uses (channel). I wasn't > really sure what that was for either. It works OK as long as the > program isn't

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Terry Coles
On Saturday, 25 February 2017 14:56:53 GMT Ralph Corderoy wrote: > Although your code now has two threads, your first initial main one, and > the one GPIO creates once you start wanting it to watch for interrupt > events, there's still Python's GIL, Global Interpreter Lock, and the > second

Re: [Dorset] Python Multiprocessing (or Maybe Multithreading)

2017-02-25 Thread Terry Coles
On Saturday, 25 February 2017 15:20:58 GMT Ralph Corderoy wrote: > > I'm still struggling a bit (well a lot actually ;-) ). The problem is > > still how to get all the things done that I need to get done. > > If you keep cycling back over the old emails as you learn more things, > they may make