Re:C++ coroutines: Initial implementation pushed to master
by halayli on Sunday January 19, 2020 @02:35AM
(#22090007)
Is that so? Please elaborate
[ Parent
| on HN ]
Re:C++ coroutines: Initial implementation pushed to master
by civicsquid on Sunday January 19, 2020 @03:31AM
(#22090197)
It looks like Facebook's `folly` library had an implementation of coroutines available in their experimental directory since mid-2018. There was still some evolution going on after it was pushed though (and it seems like there still is today).
Not sure if that helps the argument that this has been around for "years" (since it's still in the experimental directory), but I guess there were some libraries trying to accomplish this.
https://github.com/facebook/folly/tree/master/folly/experime...
Re:C++ coroutines: Initial implementation pushed to master
by pjmlp on Sunday January 19, 2020 @04:20AM
(#22090355)
The only implementation that I would consider around of years, were the C++/CX extensions, and even those aren't 100% like ISO C++ ones ended up looking like, although Microsoft was a big contributor to its design.
Re:C++ coroutines: Initial implementation pushed to master
by tus88 on Sunday January 19, 2020 @02:49AM
(#22090048)
https://en.m.wikipedia.org/wiki/GNU_Portable_Threads
N:M threading from 1999!
And there are many more recent examples too.
Re:C++ coroutines: Initial implementation pushed to master
by armitron on Sunday January 19, 2020 @10:17AM
(#22091832)
It's not N:M with arbitrary M, but N:1 (mentioned in the link you posted).
There is no parallelism whatsoever in GNU Pth.
You only get a single kernel thread and "green" userland threads cooperatively scheduled on top of that single kernel thread.
That's it.