type Task struct {
I int
}
func (t *Task) Next() (bool, int) {
if t.I Durable Coroutines for Go
21–30 of 37 posts
Re: Durable Coroutines for Go
#22Re: Durable Coroutines for Go
#23I feel like once serializing god-knows-what state across program invocations is a requirement, I'd much prefer writing this explicitly so I can at least have a chance of debugging it type Task struct { I int } func (t *Task) Next() (bool, int) { if t.I
What if there were tools to inspect and debug the coroutine state? That's an area we're exploring now.
Re: Durable Coroutines for Go
#24This seems really brittle. https://github.com/stealthrocket/coroutine/blob/main/getg_am...
Eh, this one seems a reasonable trade-off to me at this point. If you try to handle every potential issue upfront, you'll never release, and this seems entirely fixable down the road. Persistent coroutines is a pretty challenging area to explore (tried this with Lua in a previous venture), and this seems a pretty minor point in that overall complexity. I'm curious, what else have you come across that justifies the "r…
Re: Durable Coroutines for Go
#25Earlier quoted context omitted.
You’re correct that code migration is still a to do, we’ll be exploring how to do that in the future. As you can imagine there are a lot of challenges with it, but ideas are welcome!
It seems like generating some data structure definitions (similar to a protobuf) and checking them in along with the code would be useful? Then the compiler can tell you when they still match, or you made an incompatible change to the code. This seems like a situation where defining the data structure in two different ways might be good?
Re: Durable Coroutines for Go
#26Impressive work. This reminds me of an experimental JVM that was around about 20 years ago from a group called Velare. They could do durable coroutines just like this, but by throwing a particular exception rather than using `yield`. They also could return a value and allow the coro to be resumed with a value. edit: here it is https://dl.acm.org/doi/10.1145/949344.949362 It was a built-in bytecode interpreter with su…
Re: Durable Coroutines for Go
#27This seems really brittle. https://github.com/stealthrocket/coroutine/blob/main/getg_am...
Eh, this one seems a reasonable trade-off to me at this point. If you try to handle every potential issue upfront, you'll never release, and this seems entirely fixable down the road. Persistent coroutines is a pretty challenging area to explore (tried this with Lua in a previous venture), and this seems a pretty minor point in that overall complexity. I'm curious, what else have you come across that justifies the "r…
Re: Durable Coroutines for Go
#28A succinct explanation of how durable coroutines are different (in practice) from Temporal would be useful.
Re: Durable Coroutines for Go
#29Earlier quoted context omitted.
Eh, this one seems a reasonable trade-off to me at this point. If you try to handle every potential issue upfront, you'll never release, and this seems entirely fixable down the road. Persistent coroutines is a pretty challenging area to explore (tried this with Lua in a previous venture), and this seems a pretty minor point in that overall complexity. I'm curious, what else have you come across that justifies the "r…
They just seem pretty pointless as a tool in language that already have super-light green threads and good concurrency primitives.