Timeline for does a CMD window stop running while Windows 10 lock screen is enabled?
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 22, 2020 at 7:57 | comment | added | Tonny | @Nelson I programmed a few terminal emulators myself. CPU intensive isn't right. You are right about that. But I didn't want to make my comment too complicated, so I simplified. Whether it is real CPU load or blocking IO doesn't really matter for the users perspective. About your last comment: Consoles/terminals on a windowing system buffer screen content internally. They have too. Otherwise they wouldn't know what to render if the window is resized. | |
Jul 22, 2020 at 3:10 | history | edited | Keltari | CC BY-SA 4.0 |
deleted 1 character in body
|
Jul 22, 2020 at 2:51 | comment | added | Nelson | If your screen refreshes only 60 times a second, it can only display 60 numbers a second. The output doesn't know that you want it to run as fast as possible and doesn't have a mechanism of displaying multiple updates in a single refresh. I think it may be possible but it's just really complicated to buffer the input and figuring out how to combine the updates. | |
Jul 22, 2020 at 2:49 | comment | added | Nelson | One way to easily test this is to create a loop spinner. For the initial basic version, loop from 1 to X and display every number generated with a simple console output. Now, create a much more complex version that still loops, but calls a function only if more than 0.1 seconds have elapsed before outputting. You'll notice the second version runs MUCH faster, because the computer can loop through a LOT of numbers in 0.1 second. | |
Jul 22, 2020 at 2:45 | comment | added | Nelson | @Tonny It's actually not very "CPU intensive". It is because screen outputs are a blocking command. When you tell the screen to update something, you normally can't send it something else to update before it is done, so most updates are limited by the refresh rate of the screen, and slows the whole program down. To code something that has an asynchronous stream of input and output is non-trivial, and even more work to ensure that your input and output are in the same order of a procedural language, so it isn't done. | |
Jul 21, 2020 at 18:27 | comment | added | JPhi1618 | @Mast - stackoverflow.com/q/768314/101039 there is a windows message for computer being locked (session changing). | |
Jul 21, 2020 at 16:45 | comment | added | Tonny | @belle Sort off. They still produce output and the console host process keeps track of what is supposed to be displayed. It is only the actual rendering, which is the most cpu intensive part, which is suspended until the window becomes visible again. Same happens when the window is minimized. So command prompt or powershell doesn’t actually have anything to do with it. It is the console host process. | |
Jul 21, 2020 at 14:21 | comment | added | Belle | Interestingly, the command prompt and I think also Powershell do not render updates when not in view. Because of that, some "chatty" scripts actually run faster with command prompt minimized or the screen locked. | |
Jul 21, 2020 at 13:29 | comment | added | Logarr | @Mast It really depends on the game. Simple focus loss is enough to pause some games, even if partially. I have some that the music continues but the game's main loop pauses. If there is no lost focus system, the game can still activate the pause screen when locked. I don't have specific examples, but I definitely have games like this as my keyboard has a lock macro on it and I sometimes hit it on accident. | |
Jul 21, 2020 at 7:27 | comment | added | Mast | "will often be programmed to detect a computer locking and pause the game." Is that what they detect? I've always assumed it it was a foreground-background detection and that locking a device would put everything in the background. | |
Jul 21, 2020 at 7:19 | comment | added | Gizmo | And Netflix if you want to see it in action (even the browser based version). | |
Jul 21, 2020 at 2:23 | history | edited | Keltari | CC BY-SA 4.0 |
deleted 13 characters in body
|
Jul 20, 2020 at 22:08 | history | edited | Keltari | CC BY-SA 4.0 |
added 94 characters in body
|
Jul 20, 2020 at 21:34 | history | edited | Keltari | CC BY-SA 4.0 |
added 1 character in body
|
Jul 20, 2020 at 19:27 | history | edited | Keltari | CC BY-SA 4.0 |
added 82 characters in body
|
Jul 20, 2020 at 17:00 | vote | accept | Kalamalka Kid | ||
Jul 20, 2020 at 16:32 | history | answered | Keltari | CC BY-SA 4.0 |