Comment by baud9600
5 hours ago
Great work on Goose, a whole load of practical thought went into it!
I’d love to see 1st class lightweight ‘processes’ and typed comms, like CSP. These light processes would be cheap to spawn in the thousands, with synchronous comms. So it’s possible to quickly use arbitrary networks rather than OS thread worker pools with queues. Maybe like:
fn produce(out: chan<i32>) { for i in 1000 { send(out, i); } }
fn consume(inp: chan<i32>) { for i in 1000 { print(recv(inp)); } }
fn main() { let c = chan<i32>();
par {
produce(c);
consume(c);
}
}
Have you seen the way Goose does threads? It's actually pretty close to what you're talking about: https://aardappel.github.io/goose/docs/reference.html#22-thr...