From: Henry N. <Hen...@Ar...> - 2008-05-10 23:13:50
|
Henry Nestler wrote: > Paolo Minazzi wrote: >> Hi Henry, >> I added the lines you said me. >> I realize that during NO OUTPUT, I see continuosly the message >> "GetNumberOfConsoleInputEvent nothing", that is OK. >> When I launch my program that exec >> >> for (i=1 to 10000) printf("X"); >> >> I dont' see anything in the daemon-debug window ... I don't see >> "GetNumberOfConsoleInputEvent nothing". >> When the for cycle ends, The message "GetNumberOfConsoleInputEvent >> nothing" appears continuosly. > > Ok. I found some in > src/colinux/os/winnt/user/reactor.c:60 > > In "packet_read_async" it's loop without return on continues data > stream. An idea would be to remove the "while (TRUE)" and let it stop > after every ReadFile. Than the loops in console code can poll for keyboard. > > The negative side effect would be, that some other daemons goes slower. > But perhaps this is alos better for other bidirectional pipes? > > A mix between performance and as workarround we can do this: > =================================================================== > --- src/colinux/os/winnt/user/reactor.c (Revision 1038) > +++ src/colinux/os/winnt/user/reactor.c (Arbeitskopie) > @@ -61,8 +61,9 @@ > { > BOOL result; > DWORD error; > + int loop; > > - while (TRUE) { > + for (loop = 1000; loop; loop--) { > result = ReadFile(handle->rhandle, > &handle->buffer, > sizeof(handle->buffer), > ======== > >> So I decide to add two other co_debug. > > PS: Your source was very globbered. > ... Paolo wrote: > **************************************************************************************************** > As you can see, there are > > 1. calling global_window->loop > 2. console_window_t::loop > 3. GetNumberOfConsoleInputEvents nothing > CONTINE FROM point 1 > > The point is that during an heavy output the main cycle in the console > is not called. > It is not easy for me find a solution ... ideas ? > To make proofs more quickly, I need to installvmware with an > environment to rebuild colinux-daemon-console-nt.exe Try this: http://www.henrynestler.com/colinux/testing/devel-0.8.0/20080510-ntconsoleflood/ There I have remove the endless loop if console get flood of chars. You can stop it now with key ENTER or CTRL-C. But remember: The console output can have many chars in piped buffer. If you pressed ENTER, it can be long time to be see as accepted. It goes faster, if you minimised the nt-console after you have pressed the enter key. I think, the right way for the problem we have, should be to make the pipe buffer from Linux to console-output smaller. Currently it has no limit. If the buffer would be full earlyer, the console_window_t::loop will have access to keyboard faster. -- Henry N. |