0
   

C++ threading and the new processors??

 
 
Reply Sat 19 May, 2012 08:23 am
Somebody has an ordinary MFC program which uses one or more separate threads to handle disk-intensive activities (AfxBeginThread ( additems, pstr , THREAD_PRIORITY_NORMAL ) or something like that), and he goes out and buys one of the new computers with an I7 chip in it which are now under a thousand dollars USD.....

Assuming he is also using VisualStudio 2010, what exactly happens? is Win 7 bright enough to assign separate processors to separate threads when possible, or do you need to set some build parameter differently from past ages, or do you need a copy of Intel's rich-only-need-apply C++ compiler, or what exactly.

I'd appreciate hearing from anybody who's actually seen this one or has any sort of a clue.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,117 • Replies: 3
No top replies

 
gungasnake
 
  1  
Reply Mon 21 May, 2012 12:53 pm
I notice a number of people looking at this one... What I get elsewhere on the internet is that the hard-core part of whatever I'm doing needs to be in an MFC dll and the rest of it which needs to be doing clunky C language file handling needs to be in C# or the .Net version of C++, with the dll wrapped. I gather than .Net has facilities for assigning threads to cores.
0 Replies
 
tomr
 
  1  
Reply Mon 2 Jul, 2012 07:24 pm
@gungasnake,
I do not know the answer to your question... but I program some in wpf and it seems very rigid in its use of theading. For instance, you cannot make calls to the mainWindow class to manipulate user control properties from another class of your own. Well you might but I can't. I think it has something to do with the way threading is designed. Unlike in WPF, in Windows Forms you could access any control from a class other than the forms class. I do not know enough about Microsofts Foundation Classes Library and how programming microsoft applications before .net worked to really understand how threading has worked in the past (or now for that matter).
gungasnake
 
  1  
Reply Mon 2 Jul, 2012 08:19 pm
@tomr,
Quote:
For instance, you cannot make calls to the mainWindow class to manipulate user control properties from another class of your own. ...


C# is the same way more or less, you use "delegates" to do that sort of thing...

"Delegate", or at least the L and the G part of it is one of those funny words which originate in the idea of feudal relationships as in 'liege lord', and is the basis of all words like relegate, obligate, delegate, legation, legislate etc. as well as the Russian words Dolg (debt), and Dolzhen (obligation).
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » C++ threading and the new processors??
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/01/2024 at 10:24:45