4 years, 2 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?

Thanks

Question relating to:

Comment on this question
Be the first to answer this question.

You need to log in to post a question