4 ms·
Perhaps it was a little absolutist. Maybe it would be better written like this: If you're not familiar with implementing schedulers and concurrent systems then
by rkangel 6y ago
Perhaps it was a little absolutist. Maybe it would be better written like this:
If you're not familiar with implementing schedulers and concurrent systems then beware that implementing fibers from scratch is likely to result in some subtle and hard to debug problems.
If you have to use C/C++ you may well get better results using a library. If you aren't tied to the language then Erlang/Elixir, Go and Rust all have excellent implementations that have more language support.
- dosshell 6y agoI dont't agree. I'm not used to implement schedulers and concurrent systems and I wrote my own fiber-system in C a couple of months back (https://gitlab.com/dosshell/tinyfiber https://gitlab.com/dosshell/tinyfiber) after listening to the famous talk from Christian (mentioned in article). Its a bit messy, sure. But I don't think I have any subtle bugs and was not hard to debug. Performance is good too. What I want to say is: it is easy to do, even I can :P
- gpderetta 6y agoif you are not familiar with implementing schedulers and concurrent systems but you are interested, do it! It is fun and and great learning experience. Doesn't mean you have to deploy it to prod, it can be a personal project.
- rkangel 6y agoThis is an excellent point. Experimentation is always a good idea. I have just got cynical and conservative about what I choose for the basis of production systems. Actually for full disclosure I should say that I am currently building a telecomms system in Elixir. I find the decades of battle testing in the BEAM reassuring.
- gpderetta 6y agoI have written half a dozen coroutine and m:n schedulers for fun. I never once used them professionally to avoid the hammer-nail problem :)