I am writing a code in python on a raspberry pi
while(true):
functionA
functionB
Function A is basically a command that captures images in png format. I do not want it be a blocking function. I want my code to proceed to function B, while in the mean time function A captures the image and makes the data ready for the next run.
I am confused on whether to use a thread or a process.
If I have to use a thread, when will it stop? Will it stop once after function A completes it's execution? And in that case, I need to call start method every time I have to start this thread? Or should I use a process and how will I go about it meaning when will a process stop.