2 comments

  • thefourthchime14 minutes ago
    Wow, I had no idea Raymond Chen was still doing blog posts. I used to love his posts back in the day.
    • afdbcreid9 minutes ago
      He writes regularly. Sometimes explaining C++, rarely explaining C#, sometimes historic stories, sometimes current stories, etc..
  • ahartmetz50 minutes ago
    This seems to omit the main point of it, though? That the compiler turns a function into a state machine that can restart from any of its suspension points. I guess that&#x27;s the &quot;state&quot; variable, but what I&#x27;m talking about is what it contains and the partially compiler-generated code that deals with it.<p>C++ async is unfortunately a &quot;bring your own runtime&quot; sort of model (for now), but it does handle the part that would be incredibly tedious by hand, building above mentioned state machine.
    • kccqzy38 minutes ago
      You are confusing it with coroutines. This is just a plain library feature that the compiler doesn’t necessarily have special support for.
    • jcranmer41 minutes ago
      That&#x27;s the co_await&#x2F;co_yield&#x2F;co_routine stuff, which this isn&#x27;t talking about--this is talking about the std::future-et-al logic, which predates C++ coroutines by almost a decade.