If I can’t call lock on a mutex in the main application thread (my event handler because you can’t lock the main gui thread), how do I share any information between my worker and my main thread?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just have your worker thread communicate with the main thread through the event handling system. Use AddPendingEvent to send status messages back to the main thread and ProcessEvent to handle the updates.