Click here to Skip to main content
16,004,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Want to start VC++ Pin
kk.tvm6-Apr-06 23:41
kk.tvm6-Apr-06 23:41 
GeneralRe: Want to start VC++ Pin
Nishad S7-Apr-06 1:30
Nishad S7-Apr-06 1:30 
AnswerRe: Want to start VC++ Pin
Ștefan-Mihai MOGA7-Apr-06 3:23
professionalȘtefan-Mihai MOGA7-Apr-06 3:23 
QuestionStrange include Pin
Monty26-Apr-06 21:21
Monty26-Apr-06 21:21 
AnswerRe: Strange include Pin
toxcct6-Apr-06 22:24
toxcct6-Apr-06 22:24 
Questionthread problem Pin
ramanujachari6-Apr-06 20:52
ramanujachari6-Apr-06 20:52 
AnswerRe: thread problem Pin
Naveen6-Apr-06 20:58
Naveen6-Apr-06 20:58 
GeneralRe: thread problem Pin
Mike O'Neill7-Apr-06 17:04
Mike O'Neill7-Apr-06 17:04 
Naveen R wrote:
What are u doing inside that thread....?

Put some sleep...


Very bad advice for "solving" CPU usage problems in threads. It never resolves the underlying cause of high CPU usage. And how long should the thread sleep? 10 ms is probably the smallest quantum that can be gotten, and that might be too long to be responsive in some cases. And in other cases 10 ms isn't nearly long enough. So any choice is completely ad hoc, made as a result of some testing on the developer's machine for conditions that might not be valid on the user's machine.

In my experience, the presence of Sleep() in a thread, with the possible exception of Sleep(0), is generally a bad design choice.

Best regards,
Mike
AnswerRe: thread problem Pin
Matt Godbolt6-Apr-06 21:04
Matt Godbolt6-Apr-06 21:04 
GeneralRe: thread problem Pin
includeh106-Apr-06 21:16
includeh106-Apr-06 21:16 
GeneralRe: thread problem Pin
Matt Godbolt7-Apr-06 4:37
Matt Godbolt7-Apr-06 4:37 
GeneralRe: thread problem Pin
Stephen Hewitt7-Apr-06 2:53
Stephen Hewitt7-Apr-06 2:53 
GeneralRe: thread problem Pin
Blake Miller7-Apr-06 4:08
Blake Miller7-Apr-06 4:08 
GeneralRe: thread problem Pin
Stephen Hewitt8-Apr-06 1:58
Stephen Hewitt8-Apr-06 1:58 
GeneralRe: thread problem Pin
Matt Godbolt7-Apr-06 4:33
Matt Godbolt7-Apr-06 4:33 
AnswerRe: thread problem Pin
Aqueel6-Apr-06 21:19
Aqueel6-Apr-06 21:19 
Questionaccess and deleting of ListBox items Pin
parichaybp6-Apr-06 20:46
parichaybp6-Apr-06 20:46 
AnswerRe: access and deleting of ListBox items Pin
Hamid_RT6-Apr-06 20:50
Hamid_RT6-Apr-06 20:50 
GeneralRe: access and deleting of ListBox items Pin
parichaybp6-Apr-06 21:00
parichaybp6-Apr-06 21:00 
AnswerRe: access and deleting of ListBox items Pin
Naveen6-Apr-06 20:57
Naveen6-Apr-06 20:57 
GeneralRe: access and deleting of ListBox items Pin
parichaybp6-Apr-06 21:13
parichaybp6-Apr-06 21:13 
AnswerRe: access and deleting of ListBox items Pin
Hamid_RT6-Apr-06 21:16
Hamid_RT6-Apr-06 21:16 
QuestionDiff between C Structure and C++ Structure Pin
Krishnatv6-Apr-06 20:40
Krishnatv6-Apr-06 20:40 
AnswerRe: Diff between C Structure and C++ Structure Pin
Matt Godbolt6-Apr-06 20:57
Matt Godbolt6-Apr-06 20:57 
GeneralRe: Diff between C Structure and C++ Structure Pin
Cedric Moonen6-Apr-06 21:04
Cedric Moonen6-Apr-06 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.