3 ms·
Wow, you're right. Apparently this was Rust in 2010-06-23: io fn starve_main(chan[int] alive) { log "signalling main"; alive <| 1; log "s
by whytevuhuni 1y ago
Wow, you're right. Apparently this was Rust in 2010-06-23:
io fn starve_main(chan[int] alive) {
log "signalling main";
alive <| 1;
log "starving main";
let int i = 0;
while (true) {
i += 1;
}
}
- steveklabnik 1y agoYep! Some interesting things in here: `io fn`, there were three effects: io, state, and unsafe. There was also pure, for functions with no effect. chan for channels. <| was a "semi-synchronous message send," it blocked if the queue was full. square brackets for generics int was two's compliment signed integer with machine dependent size log for printing to the screen