HN2new | past | comments | ask | show | jobs | submitlogin

Yes, it's basically the idea in Duff's device. Protothreads (http://dunkels.com/adam/pt/) uses a pretty similar trick.


Ah, that's exactly the trick I was thinking of. I think I learned it from [1], but I'm pretty sure Protothreads predates that post. Thanks for the link!

1: https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: