One pattern I've seen in Go is to spawn a "task" and "error" routine, and send the "error" routine as an argument into the "task". Then call "select {}" on both, and handle the first result that comes back. Kind of similar to callbacks in a way. Would that translate to Rust?
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@bodil is spot on that the lower level messaging often implements some future-like constructions. The subtle difference between Go and Erlang: goroutines do not have identity, channels do. Whereas processes in Erlang have PIDs. -
This has a consequence: you cannot talk about a goroutine going away unless it tells you about it. But you can link/monitor Erlang processes since they have identity.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.