|
-
November 19th, 2008, 09:23 AM
#2
Re: How to use CCriticalSection
Well, as J.Newcomer wrote in his essay: The Best Synchronization Is No Synchronization!
Is your worker thread only writes data into array and your main GUI thread only reads this data in, then a better way would be not use any synchronization at all.
Just define some user message (from the WM_APP range), let the worker thread PostMessage this message and pass the data as PostMessage parameter(s), and let the main thread handle this message, fill data in the array and work with this array.
Victor Nijegorodov
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
|