-
September 21st, 2004, 06:13 PM
#1
Best way for worker to gain access to variables set by GUI?
I am converting my project from single to multi-threaded. The single threaded version has lots and lots of variables all in the dialog's class that get set by the GUI. The new worker thread consists of several functions that must use all of these variables.
I am in the process of creating a container class that is made up of all of these variables and then either passing a copy of it to the thread function or making it global (I'll probably end up making it global so the variables dont' have to be passed to each function - call me lazy if you will. )
Am I going about this a good way, or is there a better (less code editing, safer, etc.) way of doing it? I'm pretty sure that I should not access the variables inside the dialog class from the worker thread - hence this effort - is that correct?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|