×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Threading in drivers

  • Posts: 554
  • Thank you received: 138
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
4 years 5 months ago #45454

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

  • Posts: 474
  • Thank you received: 168

Replied by Jarno Paananen on topic Threading in drivers

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.
The following user(s) said Thank You: Chris Rowland
4 years 5 months ago #45457

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

Time to create page: 0.519 seconds