NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
My tutorial and take on C++20 coroutines (2021) (scs.stanford.edu)
cherryteastain 23 hours ago [-]
I find the article useful from a "how do C++20 coroutines work" perspective, but these sorts of tutorials don't really help you use coroutines in anything beyond a toy program.

I personally found coroutines are useful only in conjunction with a library wrapping OS system calls to interact with sockets (epoll/iouring on Linux, for instance), providing an event loop, and handles the complexity of multithreading. The most fleshed out one out there is probably boost asio.

hcho3 23 hours ago [-]
beyondCritics 1 days ago [-]
>... I sadly found the explanation of coroutines utterly incomprehensible. Same for almost every other explanation I found on the web.

Nice to see a mirror of my experience.

avalys 1 days ago [-]
Aren’t there some lightweight wrapper libraries now that make this a bit cleaner?
psyclobe 1 days ago [-]
gcc-10? What is this, 2020?

Nice overview though!

messe 1 days ago [-]
I am not remotely religious, but please pray for us who are still dealing with older versions than that.
Borg3 1 days ago [-]
gcc (GCC) 3.2 20020927 (prerelease)

It workz! ;)

NooneAtAll3 1 days ago [-]
there's (2021) literally in the title
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 16:27:04 GMT+0000 (Coordinated Universal Time) with Vercel.