5 ms·
Relevant article by Raymond Chen: https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989 https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=10.
by g051051 5y ago
Relevant article by Raymond Chen: https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989 https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=10...
- pjc50 5y agoYes, just ran across it - and the review it links to http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1364r0.pdf http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p136... To me the valuable insight is "Fibers make asynchronous functions appear to be synchronous. Depending on what color glasses you are wearing, this is either a cool trick or a hidden gotcha. Over time, the consensus of most of the computing community has settled on the side of “hidden gotcha”." Lots of people talk about "coloured functions", because async functions in e.g. C# do indeed have a different colour that gets transmitted up the call stack. Raymond is hinting there that this is actually good because you can see the colour; working with fibers results in the same thing where you can't see the colours.
- unnouinceput 5y agoAlso Ray has, for those who still find fibers interesting, a series on them. Part 1 starts here: https://devblogs.microsoft.com/oldnewthing/20200602-00/?p=103819 https://devblogs.microsoft.com/oldnewthing/20200602-00/?p=10...
- ar1su 5y agowoah, I can't believe I didn't find this, thank you!
- dataflow 5y agoI don't get why he goes through all that trouble to estimate the stack instead of just calling VirtualQuery or QueryVirtualMemoryInformation to figure out where the guard page is. Seems a lot more reliable and doesn't require actually touching that memory.