A post from earlier this week regarding multiprocessing got me pondering my Security Camera plugin. My plugin spawns a separate thread each time it goes out to capture image from a camera (indigo device). Once it is done with he capture it clears the thread and repeats the process. I do this so the camera run in parallel and can each capture an image every x seconds. So my questions are:
1) Is there a more efficient way to do this?
2) Is there a way for Indigo to spawn a separate process for each device in a plugin?
3) I don't think multi-processing makes a difference here since my threads only stay open for, at most, a couple of seconds. Is that true?
4) Would it be better to spawn a separate process for each camera and keep it open versus closing it and opening it again?
I run Security Camera 24x7 for weeks at a time without much problem. Just trying to determine if I can improve performance.
thanks for any guidance.