by greenSunglass on 10/19/23, 6:45 AM with 35 comments
by kitd on 10/20/23, 6:34 PM
edit: here it is https://dl.acm.org/doi/10.1145/949344.949362 It was a built-in bytecode interpreter with suspendable threads
It changed significantly how you think about cooperating processes. It was like watching 2 processes have a conversation with each other without the controlling code getting involved in any way. Also, if you save the coros after each call, you can get step-by-step replays which are very helpful in debugging.
by skybrian on 10/20/23, 7:00 PM
by tedunangst on 10/20/23, 6:23 PM
https://github.com/stealthrocket/coroutine/blob/main/getg_am...
by hnav on 10/20/23, 8:27 PM
type Task struct {
I int
}
func (t *Task) Next() (bool, int) {
if t.I < 3 {
return t.I++, true
}
return 0, false
}
var t Task
t.Next()
json.Marshal(t)
by zellyn on 10/20/23, 8:30 PM
by ctvo on 10/21/23, 5:21 PM
by born-jre on 10/20/23, 7:09 PM
what if u build a wasm runtime that can save and restore memory with and execution states, sounds much more full proof. or i might have misunderstood this idea :D.
by infogulch on 10/20/23, 6:33 PM
by varispeed on 10/20/23, 9:48 PM
by zelly on 10/21/23, 3:09 AM
by rweir on 10/20/23, 10:08 PM