r/programming • • Feb 06 '19

Visual Studio Code: January 2019 (version 1.31)

https://code.visualstudio.com/updates/v1_31
790 Upvotes

340 comments sorted by

View all comments

367

u/Namtsua Feb 06 '19

Woah, no reloading for new extensions is sick

134

u/Veranova Feb 06 '19

Now I only have to restart Windows every time!!! /s :D

50

u/Ameisen Feb 07 '19 edited Feb 07 '19

A ton of software complains like twenty times that I need to restart Windows if I don't close certain apps during an installation... Then it works fine and doesn't bother me any more. The only things that usually require restarts are certain Windows Updates.

I presume it's due to the fact that Linux lets files be modified while opened/loaded/being executed. Windows locks them (as they memory map them with a lock)... So Linux can update files without forcing things to stop (though that can break things badly). Windows has to restart to clear all the file locks that the system itself has.

Which is also odd, as NT being a hybrid kernel is far less 'integrated' and monolithic than the monolithic Linux kernel.

Ed: to clarify, Linux generally memory maps executables/libraries as copy-on-write. You can modify/delete executables while they are running, and it won't impact the current execution. However, if you update a shared object with a new one with a new ABI, and a currently - executing program loads it presuming it is the same as before... breaky-breaky-time. Try updating glibc on a Linux system, one library at a time. The entire system will stop functioning at all before you are a third complete. Also, interestingly, file locking is and has been competely broken in Linux.. well, forever. It's always a good idea to memory map files on Linux as copy-on-write for reads so that they don't inexplicably change on you while you are reading them. The kernel may do that for you now internally, though.

17

u/RirinDesuyo Feb 07 '19

Yeah I think the locking and filesystem behavior is the reason for it I pressume. Though if I recall the new iteration for Windows (Windows Core OS) is gonna mitigate that somehow by creating an identical image of the OS and updating that instead then hot-swapping them on restart. Don't quote me on that though I heard in from an article somewhere I forgot sadly xD

10

u/G00dAndPl3nty Feb 07 '19

I think the main reason is actually due to the registry. Updates to some entries are not visible until after rebooting

2

u/cat_in_the_wall Feb 08 '19

it's not a hotswap if you reboot. what they'll do is basically have them side by side, and on a reboot it just uses the new stuff.