As of now, I have tried the following
None of the above three attempts worked. Also to elaborate I added these commands in the main.cpp file after all the tasks are started. My variable 1 is from the Logic module and variable 2 is from control module. I need my control module to acces the value inside variable 1 and since they are on saperate threads, I believe they must be created saperately and linked together. please help me resolve this issue.