ConsoleApplication scrollbar scrolls in thread

I have server applications on which I try to get some indicators so that I can debug them. I found that when I scroll back through the window, I suddenly get timeouts from clients. Of course, moving the scroll bar stopped the application.

I probably miss something funding here, but I can't understand why moving the scrollbar in the console window will block the stream.

Very simple to reproduce:

Sub Main()
    Do
        Console.WriteLine(Now.ToString("O"))
        System.Threading.Thread.Sleep(1000)
    Loop
End Sub

Run this, and any interaction with the window blocks the thread. In the example below, I slightly moved the scroll bar and held it in position for a few seconds before releasing

imagehttp://www.briandrought.com/miscpics/scrollbar.png

Timer, Thread.Sleep, . ( ?)?

,

+1
1

. , Windows. , , , .

0

Source: https://habr.com/ru/post/1542951/


All Articles