Click here to Skip to main content
15,891,907 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Rotation Pin
Waldermort21-Jan-07 23:34
Waldermort21-Jan-07 23:34 
GeneralRe: Rotation Pin
nutkase22-Jan-07 1:15
nutkase22-Jan-07 1:15 
GeneralRe: Rotation Pin
softwaremonkey21-Jan-07 23:48
softwaremonkey21-Jan-07 23:48 
GeneralRe: Rotation Pin
Waldermort22-Jan-07 1:24
Waldermort22-Jan-07 1:24 
AnswerRe: Rotation Pin
Waldermort22-Jan-07 1:40
Waldermort22-Jan-07 1:40 
Questionlib file Pin
mike dano21-Jan-07 21:42
mike dano21-Jan-07 21:42 
AnswerRe: lib file Pin
Nibu babu thomas21-Jan-07 21:58
Nibu babu thomas21-Jan-07 21:58 
QuestionMutexes and sleeping threads Pin
softwaremonkey21-Jan-07 21:00
softwaremonkey21-Jan-07 21:00 
Hi,

I have some code that tries to get hold of a mutex using WaitForSingleObject and if it succeeds, it performs a sequence involving a delay using Sleep(). My question is, will the thread still own the mutex while it is sleeping or can other threads get hold of it? I DONT want other threads to be able to grab the mutex during the delay. The code is something like...

{
if(WaitForSingleObject(m_hDcpdMutex, DCPD_TIMEOUT) != WAIT_OBJECT_0)
{
return false;
}

m_pKeithley->ReadChannel(m_nCrackPDChan[i], &pOffVals[i]);
SetCurrent(1); // Turn current on
Sleep(m_nSettleTime); // Allow to settle
m_pKeithley->ReadChannel(m_nCrackPDChan[i], &pOnVals[i]);
SetCurrent(0); // Turn current off
ReleaseMutex(m_hDcpdMutex);
return true;
}
Any help/comments would be much appreciated!

Tony
AnswerRe: Mutexes and sleeping threads Pin
Nibu babu thomas21-Jan-07 21:10
Nibu babu thomas21-Jan-07 21:10 
Questionhash_map in VC6 [modified] Pin
whatever@whatever.com21-Jan-07 20:22
whatever@whatever.com21-Jan-07 20:22 
AnswerRe: in VC6 Pin
Cedric Moonen21-Jan-07 20:24
Cedric Moonen21-Jan-07 20:24 
GeneralRe: in VC6 Pin
whatever@whatever.com21-Jan-07 20:47
whatever@whatever.com21-Jan-07 20:47 
GeneralRe: in VC6 Pin
Christian Graus21-Jan-07 23:43
protectorChristian Graus21-Jan-07 23:43 
QuestionHow to convert doc files to pdf files? Pin
asenthil_858521-Jan-07 20:00
asenthil_858521-Jan-07 20:00 
AnswerRe: How to convert doc files to pdf files? Pin
nutkase21-Jan-07 23:15
nutkase21-Jan-07 23:15 
AnswerRe: How to convert doc files to pdf files? Pin
David Crow22-Jan-07 4:54
David Crow22-Jan-07 4:54 
GeneralRe: How to convert doc files to pdf files? [modified] Pin
asenthil_858522-Jan-07 17:51
asenthil_858522-Jan-07 17:51 
QuestionSDI v/s dialog-based Pin
namratab21-Jan-07 19:05
namratab21-Jan-07 19:05 
AnswerRe: SDI v/s dialog-based Pin
Christian Graus21-Jan-07 23:44
protectorChristian Graus21-Jan-07 23:44 
GeneralRe: SDI v/s dialog-based Pin
namratab22-Jan-07 2:00
namratab22-Jan-07 2:00 
AnswerRe: SDI v/s dialog-based Pin
David Crow22-Jan-07 4:56
David Crow22-Jan-07 4:56 
GeneralRe: SDI v/s dialog-based Pin
namratab22-Jan-07 6:33
namratab22-Jan-07 6:33 
Questionfinding broken links ? Pin
Sakthiu21-Jan-07 18:02
Sakthiu21-Jan-07 18:02 
AnswerRe: finding broken links ? Pin
Christian Graus21-Jan-07 18:17
protectorChristian Graus21-Jan-07 18:17 
AnswerRe: finding broken links ? Pin
S Douglas21-Jan-07 23:56
professionalS Douglas21-Jan-07 23:56 

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.