I need some help with C++. I have a thread running in the background that keeps continuously checking for data and upon some conditions met it will process that data. data is stored in an char array[]. I want to use this array in some other script. ( I can access this array from other script).
I want to do some thing like this with the script… if ever there is a data change in this array ( or if new data arrives ) process that data.
don’t have any idea about this…. please help 🙂
You need condition variables. They’re in virtually every threading API. You can block on them until the condition becomes true. You need to refer to whatever implements your threading for more details.