Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
andreasgonewild
· 9y ago · 0 comments
Been there, done that :) It's a neat trick, but the issue for me is that you still need to pass a separate struct for state which breaks the illusion enough that you might as well just write an ordinary iterator.
Comments
[–]
kindfellow92
9y ago
I agree. If you want user-level threading, just use a stack swapping library like libpth.
[–]
kosma
9y ago
Most well-written portable interrupt code needs to pass an explicit context anyway, so... it's not as bad as it sounds.