×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Threading in drivers

8 months 1 week ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 494
Karma: 9
More
Topic Author
Threading in drivers #45454
Is threading using the C++11 threading, atomic and condition_variable includes possible for indi drivers? I can see that pthread is Ok but it seems a lot more complex and I don't feel up to reinventing threading. I can get these includes but will all the various builds also be OK?

This is because the simplest way to implement guiding is to delegate it to a separate thread but I need to be able to update things from the thread and cancel the thread if a new guide command arrives.

Chris

Please Log in or Create an account to join the conversation.

8 months 1 week ago
jpaana
Gold Boarder
Gold Boarder
Posts: 256
Karma: 5
More
Threading in drivers #45457
Both are in use, earlier drivers used pthread directly, but for example ASI CCD driver has been updated to use std::thread and atomics etc. now.

Remote observatory running Ubuntu 20.04 x64 with ScopeDome 2M, Skywatcher EQ8, TS 8" RC, Atik 383L+, ASI178MC, ASI120MM-S, SX Lodestar X2, SX USB wheel with OAG, ZWO EAF, Gemini SnapCap, USB_DewPoint, KomaHub
The following user(s) said Thank You ChrisRowland

Please Log in or Create an account to join the conversation.

Time to create page: 0.812 seconds