13 ms·
good point, I think I ran into that when I was playing with coroutines to build a simple finite state machine to parse something; as soon as it got the least bi
by krosaen 16y ago
good point, I think I ran into that when I was playing with coroutines to build a simple finite state machine to parse something; as soon as it got the least bit complex, I was like, "you mean I can't extract a generator!?" I was originally inspired by this post:
http://eli.thegreenplace.net/2009/08/29/co-routines-as-an-alternative-to-state-machines/ http://eli.thegreenplace.net/2009/08/29/co-routines-as-an-al...
and was thrilled with how clever it all seemed, but in practice, it seems to be stretching the capabilities of the yield statement too far
- ntoshev 16y agoActually, he does provide a solution to this, in the section "Tasklets and futures". It's not simple though.