Re: python capture_preview speed
Jim Easterbrook <[email protected]> Wed, 29 Dec 2021 17:55:51 +0000
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <[email protected]> |
On 29/12/2021 17:40, Khoroshyy Petro wrote: > Another related question. Does > anyone have experience running python gphoto2 in a separate thread? I > haw little if any experience with threads. My Idea was to run gphoto in > a separate thread and then exchange data with GUI, not sure if it is a > correct approach. As far as I know, using python-gphoto2 in a separate thread is perfectly OK. If you do everything from camera initialisation onwards in the same thread you should be safe. Operations that may take some time surrender the Python GIL (global interpreter lock) so other Python threads can run while gphoto2 is busy. -- Jim Easterbrook <http://www.jim-easterbrook.me.uk/> _______________________________________________ Gphoto-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gphoto-user