Click here to Skip to main content
15,910,872 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread and passing objects Pin
Nish Nishant9-Feb-02 11:41
sitebuilderNish Nishant9-Feb-02 11:41 
GeneralRe: AfxBeginThread and passing objects Pin
scgadgets9-Feb-02 11:57
scgadgets9-Feb-02 11:57 
GeneralRe: AfxBeginThread and passing objects Pin
Nish Nishant9-Feb-02 12:06
sitebuilderNish Nishant9-Feb-02 12:06 
Generalcopy two chars from a char* Pin
Rickard Andersson209-Feb-02 9:37
Rickard Andersson209-Feb-02 9:37 
GeneralRe: copy two chars from a char* Pin
Michael Dunn9-Feb-02 9:52
sitebuilderMichael Dunn9-Feb-02 9:52 
GeneralTimeout Pin
9-Feb-02 9:27
suss9-Feb-02 9:27 
GeneralRe: Timeout Pin
Tim Smith9-Feb-02 13:56
Tim Smith9-Feb-02 13:56 
GeneralRe: Timeout Pin
9-Feb-02 14:51
suss9-Feb-02 14:51 
Thanks for your answer, I must have not been clear enough, sorry for it.

This is all about communication over the serial port.

SerialFlowOfDataSusceptibleToHung() is a data stream from the external device, and it is itself completely blocking the worker thread from which the given read operation was issued, as a result of which another blocking command like Sleep(ms) is no solution to this problem.

In the majority of cases all the data can be read from the device in less than a second, but unfortunately in case the read operation hungs or slowly executes, the worker thread does not return for a long time.

My prog uses time sharing of the serial port between several worker threads (a command from one thread can only be issued after the previous from another thread has been completely executed, and thus the port has been freed)
If one of my threads blocks the port, all the communication of my other threads with the device is impossible.
That's why I wanna limit the maximum time of one thread blocking the one and only communication channel.
Limiting the time of a read operation does not affect the average thread, because it usually terminates quickly. But in case of a trouble (slowed down read) the user receives a little less data, but does not have to wait too long for it.


Thats why I wanna find a solution to limit the time of execution of blocked threads.

Thanks in advance.

Pepe
GeneralGDI+ Pin
Mazdak9-Feb-02 9:25
Mazdak9-Feb-02 9:25 
GeneralNeed Help in Chat Software Pin
nomanali_809-Feb-02 8:59
nomanali_809-Feb-02 8:59 
GeneralOpenGL vs DirectX8.1 Pin
antoine@orchus-tech9-Feb-02 8:09
antoine@orchus-tech9-Feb-02 8:09 
GeneralRe: OpenGL vs DirectX8.1 Pin
Sprudling9-Feb-02 11:26
Sprudling9-Feb-02 11:26 
GeneralRe: OpenGL vs DirectX8.1 Pin
Tim Smith9-Feb-02 14:00
Tim Smith9-Feb-02 14:00 
GeneralRe: OpenGL vs DirectX8.1 Pin
antoine@orchus-tech9-Feb-02 14:23
antoine@orchus-tech9-Feb-02 14:23 
GeneralRe: OpenGL vs DirectX8.1 Pin
Tim Smith9-Feb-02 16:40
Tim Smith9-Feb-02 16:40 
GeneralInternet Client SDK Pin
AJ1239-Feb-02 6:42
AJ1239-Feb-02 6:42 
GeneralRe: Internet Client SDK Pin
Michael Dunn9-Feb-02 7:24
sitebuilderMichael Dunn9-Feb-02 7:24 
GeneralUPDATE_COMMAND_UI Pin
Mazdak9-Feb-02 6:13
Mazdak9-Feb-02 6:13 
GeneralRe: UPDATE_COMMAND_UI Pin
Nish Nishant9-Feb-02 12:07
sitebuilderNish Nishant9-Feb-02 12:07 
GeneralRe: UPDATE_COMMAND_UI Pin
Mazdak9-Feb-02 21:02
Mazdak9-Feb-02 21:02 
GeneralCommandline Pin
9-Feb-02 5:48
suss9-Feb-02 5:48 
GeneralRe: Commandline Pin
Michael P Butler10-Feb-02 2:04
Michael P Butler10-Feb-02 2:04 
GeneralRe: Commandline Pin
moliate10-Feb-02 6:49
moliate10-Feb-02 6:49 
GeneralDeleting directories Pin
Stan the man9-Feb-02 4:35
Stan the man9-Feb-02 4:35 
GeneralRe: Deleting directories Pin
Michael Dunn9-Feb-02 7:28
sitebuilderMichael Dunn9-Feb-02 7:28 

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.