V
VirtualDev
i want to know how to limite the use of CPU by threads using C++. can
you help me please?
you help me please?
VirtualDev said:i want to know how to limite the use of CPU by threads using C++. can
you help me please?
VirtualDev said:i want to know how to limite the use of CPU by threads using C++. can
you help me please?
Puppet_Sock said:You need to ask this in a news group specific to your compiler
and operating system. Since you don't even mention what CPU
you are using, it's pretty difficult to even begin to guess what
news group that might be. Try groups.google.com and do some
searching for your platform.
Here we only talk about the standard C++ language, and that
does not include any notion of a thread, never mind doing any
sort of limiting the CPU in a thread.
Socks
damjan said:[..]
Can someone please explain to me this standard C/C++ vs. platform
dependent issue. Considering threads, the C run-time library includes
a function __beginthread.
Under Windows (pardon me for saying) this
is in a file libcmt.lib. If I link with that library or call
functions from it (e.g. the aforementioned beginthread), does that
mean my source won't port to linux?
Then how do i know what is and what isn't a part of standard C/C++,
that is, which functions i mustn't call if i want to retain
portability?
Dumb question, i know, but the "this is not a standard c++ topic" kind
of replies seem to exuberate here.
Phlip said:You are asking how to set the scheduler priority of threads.
You need to use Google to find a forum dedicated to your threading library.
This forum is only qualified to discuss the C++ language itself, which
doesn't come with a portable thread solution.
Further, both the need to have threads and the need to schedule their
priorities are signs of a poor design.
threads instead of building an event-driven architecture. So you might
think about simplifying your design, too.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.