News for hackers. Stuff that matters.
Re:Show HN: uThreads – Concurrent User Threads in C and C++ by saman_b on Monday November 07, 2016 @01:54PM (#12893750)
Thanks! good point; now that I look at the page, there is not a single sample code in there. I'll update it soon.
Re:Show HN: uThreads – Concurrent User Threads in C and C++ by krat0sprakhar on Monday November 07, 2016 @01:58PM (#12893796)
Awesome! As an example, Rayon[0] does a very good job (IMHO) at this.

[0] - https://github.com/nikomatsakis/rayon

Re:Show HN: uThreads – Concurrent User Threads in C and C++ by saman_b on Monday November 07, 2016 @02:34PM (#12894193)
Thanks, oh all those fancy functions. I need to improve the interface a bit, as for now everything is only based on using uThreads as the unit of concurrency. e.g., this is a recursive Fibonacci: https://github.com/samanbarghi/uThreads/blob/master/test/Fib... and a fork-and-join Fibonacci: https://github.com/samanbarghi/uThreads/blob/master/test/Fib...

There is no fork-and-join in uThreads yet, and I created it using create and join. The interface will improve in the future :)