Click here to Skip to main content
15,887,436 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Mutex WaitForSingleObject does not Signal Pin
Richard MacCutchan1-Dec-16 21:39
mveRichard MacCutchan1-Dec-16 21:39 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
ForNow2-Dec-16 2:25
ForNow2-Dec-16 2:25 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
Richard MacCutchan2-Dec-16 3:01
mveRichard MacCutchan2-Dec-16 3:01 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
ForNow10-Dec-16 15:12
ForNow10-Dec-16 15:12 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
Richard MacCutchan10-Dec-16 20:46
mveRichard MacCutchan10-Dec-16 20:46 
AnswerRe: Mutex WaitForSingleObject does not Signal Pin
Munchies_Matt9-Dec-16 2:52
Munchies_Matt9-Dec-16 2:52 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
ForNow10-Dec-16 15:07
ForNow10-Dec-16 15:07 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
Munchies_Matt10-Dec-16 21:01
Munchies_Matt10-Dec-16 21:01 
ForNow wrote:
do threads 2 - 4 waits

Yes.


ForNow wrote:
When the ReleaseMutex are all released or only one at a time


It depends on the scheduler. Thread scheduling is a very interesting topic in OS design, and the rules can vary from platform. But a general rule is that the waiting thread with the highest priority runs. However some OSs throw in a bit of priority inversion on occasion to free up any deadlocks.

Within the same priority group you might decide on say, 'last thread run', or 'first thread waiting' to decide which to activate and give the CPU to. A bit like FIFO, LRU LIFO etc, there are a lot of designs.

The important point though is that the OS does this for you so no need to worry about it. Use the example from Microsoft and all will be well.
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
ForNow11-Dec-16 0:17
ForNow11-Dec-16 0:17 
GeneralRe: Mutex WaitForSingleObject does not Signal Pin
Munchies_Matt11-Dec-16 21:48
Munchies_Matt11-Dec-16 21:48 
QuestionC++ Pin
Member 1287185126-Nov-16 3:50
Member 1287185126-Nov-16 3:50 
AnswerRe: C++ Pin
PIEBALDconsult26-Nov-16 4:10
mvePIEBALDconsult26-Nov-16 4:10 
AnswerRe: C++ Pin
Richard MacCutchan26-Nov-16 4:12
mveRichard MacCutchan26-Nov-16 4:12 
AnswerRe: C++ Pin
Afzaal Ahmad Zeeshan26-Nov-16 4:39
professionalAfzaal Ahmad Zeeshan26-Nov-16 4:39 
AnswerRe: C++ Pin
Patrice T29-Nov-16 17:14
mvePatrice T29-Nov-16 17:14 
QuestionGame dev tutorials for c++ Pin
dolfijn300025-Nov-16 7:48
dolfijn300025-Nov-16 7:48 
AnswerRe: Game dev tutorials for c++ Pin
Afzaal Ahmad Zeeshan26-Nov-16 4:44
professionalAfzaal Ahmad Zeeshan26-Nov-16 4:44 
GeneralRe: Game dev tutorials for c++ Pin
dolfijn300026-Nov-16 6:59
dolfijn300026-Nov-16 6:59 
GeneralRe: Game dev tutorials for c++ Pin
Afzaal Ahmad Zeeshan26-Nov-16 8:45
professionalAfzaal Ahmad Zeeshan26-Nov-16 8:45 
AnswerRe: Game dev tutorials for c++ Pin
CPallini28-Nov-16 21:56
mveCPallini28-Nov-16 21:56 
QuestionUsing multiple cores within a single thread in C++ and MFC Pin
TQTL22-Nov-16 6:43
professionalTQTL22-Nov-16 6:43 
AnswerRe: Using multiple cores within a single thread in C++ and MFC Pin
Richard MacCutchan22-Nov-16 8:38
mveRichard MacCutchan22-Nov-16 8:38 
AnswerRe: Using multiple cores within a single thread in C++ and MFC Pin
Patrice T22-Nov-16 10:54
mvePatrice T22-Nov-16 10:54 
AnswerRe: Using multiple cores within a single thread in C++ and MFC Pin
Randor 22-Nov-16 12:27
professional Randor 22-Nov-16 12:27 
AnswerRe: Using multiple cores within a single thread in C++ and MFC Pin
David Crow22-Nov-16 12:48
David Crow22-Nov-16 12:48 

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.