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

C / C++ / MFC

 
QuestionRe: Dynamic Menu Creation Pin
David Crow25-Feb-15 5:53
David Crow25-Feb-15 5:53 
QuestionSetEvent and WaitForSiongleObject Pin
Munchies_Matt23-Feb-15 6:02
Munchies_Matt23-Feb-15 6:02 
AnswerRe: SetEvent and WaitForSiongleObject Pin
Albert Holguin23-Feb-15 9:45
professionalAlbert Holguin23-Feb-15 9:45 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt23-Feb-15 21:26
Munchies_Matt23-Feb-15 21:26 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Jochen Arndt23-Feb-15 23:10
professionalJochen Arndt23-Feb-15 23:10 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 0:02
Munchies_Matt24-Feb-15 0:02 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Albert Holguin24-Feb-15 3:54
professionalAlbert Holguin24-Feb-15 3:54 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 4:02
Munchies_Matt24-Feb-15 4:02 
Albert Holguin wrote:
You should show all applicable code (CreateEvent, thread initialization, any other code in the threads).


I gave you the CreateEvent code, there aren't any other threads (except for the main thread, the event is not waited on or used anywhere else than shown, and the thread initialisation is with the usual CreateThread() call:

C++
trHR = CreateThread(NULL,0, &ThreadReadProc, this, 0, 0);




Albert Holguin wrote:
You have another issue. As was already mentioned, it is likely one of the other blocking calls you're making


As I told the other guy, no, this isn't that case. As you can see from the code the read file completes, a write file is done, and an event signalled. The waiting thread only does a write file.

How much more simply can it be explained to you? You have seen the code, and moving the second write file into the same thread as the first write file results in no delay at all demonstrating that the fault lies in the thread scheduling.

I also don't need a timer to tell me anything, I have a USB bus analyser running and tracing from my driver thats telling me its taking over 4 seconds for the waiting thread to get scheduled.
GeneralRe: SetEvent and WaitForSiongleObject Pin
Albert Holguin24-Feb-15 4:06
professionalAlbert Holguin24-Feb-15 4:06 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 4:13
Munchies_Matt24-Feb-15 4:13 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Albert Holguin24-Feb-15 4:16
professionalAlbert Holguin24-Feb-15 4:16 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 5:13
Munchies_Matt24-Feb-15 5:13 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt23-Feb-15 22:25
Munchies_Matt23-Feb-15 22:25 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Albert Holguin24-Feb-15 4:00
professionalAlbert Holguin24-Feb-15 4:00 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 4:12
Munchies_Matt24-Feb-15 4:12 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Frankie-C24-Feb-15 5:19
Frankie-C24-Feb-15 5:19 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 6:46
Munchies_Matt24-Feb-15 6:46 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Frankie-C24-Feb-15 21:46
Frankie-C24-Feb-15 21:46 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 22:12
Munchies_Matt24-Feb-15 22:12 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Frankie-C24-Feb-15 22:49
Frankie-C24-Feb-15 22:49 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 22:57
Munchies_Matt24-Feb-15 22:57 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Frankie-C24-Feb-15 23:02
Frankie-C24-Feb-15 23:02 
GeneralRe: SetEvent and WaitForSiongleObject Pin
Munchies_Matt24-Feb-15 23:06
Munchies_Matt24-Feb-15 23:06 
QuestionDeviceIoControl for drive information Pin
john563223-Feb-15 3:20
john563223-Feb-15 3:20 
QuestionQuicksort slower than mergesort... Pin
gautgaut20-Feb-15 13:22
gautgaut20-Feb-15 13:22 

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.