Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 16:30:25 +0000



Post From: C++ threads inside a ACSIL study?

[2023-02-08 16:11:14]
User133994 - Posts: 80
Has anyone successfully used threads in a custom study?

I'm trying to use a TCP server/client architecture to share data between separate SC instances but can't seem to get a thread working in the Client custom study. A blocking client appears to work without crashing SC but when I add something like this:

std::thread watchdog([&]
   {
   std::this_thread::sleep_for(std::chrono::seconds(20));
   io_service->stop();
   });

SierraChart crashes. I know this isn't a code support forum..so I'm not asking for code review, just someone with more experience than I who might have a working thread template study that I can look at.

Even better, if you have a working method of sending data from one chart in a Sierra Chart instance to another chart in an entirely different Sierra Chart instance, that would be grand.

Thanks all