3 years, 8 months ago.
How to access class variables of thread
I have a thread that I spawn that populates some variables of a class. I then want to access those variables outside of the thread at various times. I have tried a mutex lock(makes sense to me) around the access to the class variables outside of the thread, but the program will still halt execution as soon as anything tries to access the variables outside of the thread.
Is there anything I am missing?
Question relating to:
To post an answer, please log in.