Support Board
Date/Time: Sun, 24 Nov 2024 18:41:40 +0000
[Programming Help] - C++ ThisThread.Sleep Locks Up the Whole Program
View Count: 203
[2024-05-07 16:01:28] |
MichaelPPTF - Posts: 69 |
Hello, I am trying to understand how threads work in SC. For example, I have a function that does something like this: #include <thread> #include <chrono> for (int i = 0; i < 100; ++i) { ### do something ###; std::this_thread::sleep_for(std::chrono::milliseconds(100)); } When the code block is executed, the whole program locks up until the execution is complete. How do I identify which thread belongs to which chart so the main Sierra thread isn't affected by the sleep function? |
[2024-05-07 16:47:14] |
Sierra_Chart Engineering - Posts: 17159 |
There is only a single thread for study functions. It is the same as the main thread of Sierra Chart. You cannot do this. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: