Dec-24-2020, 11:46 PM
Hey Everyone,
I am writing a program that checks various sensors in the background, and controls hardware accordingly.
I wrote the program to using Processes in Multiprocessing, so that each sensor can check simultaneously. I have run into a problem. One of the processes is told to sleep for 60 seconds and try again if it cannot connect to a sensor, but when that happens all the processes seem to sit and wait during this time.
This isn't a issue of the program stalling, or a break due to low resources... it just seems to want to wait.
The only thing I can think might be the problem is that I am using Multiprocessing.Queue.get() and Multiprocessing.Queue.put() so I can receive any return data from the called functions.
Do those methods invoke a process lock?
Thanks
I am writing a program that checks various sensors in the background, and controls hardware accordingly.
I wrote the program to using Processes in Multiprocessing, so that each sensor can check simultaneously. I have run into a problem. One of the processes is told to sleep for 60 seconds and try again if it cannot connect to a sensor, but when that happens all the processes seem to sit and wait during this time.
This isn't a issue of the program stalling, or a break due to low resources... it just seems to want to wait.
The only thing I can think might be the problem is that I am using Multiprocessing.Queue.get() and Multiprocessing.Queue.put() so I can receive any return data from the called functions.
Do those methods invoke a process lock?
Thanks