I am interested in Rust as a possible alternative to Erlang. I'm not a
committed Erlang dev at all - just starting (as a long-time C++ dev), so
Rust is attractive as a slightly less bonkers syntax. And it should be
(a lot) faster.
Erlang seems to me to have two big advantages:
- localised GC by task
- task monitoring
Its not clear to me that the former is (or could be, given the memory
model for shared data) on the cards, but I'm interested in the latter.
The docs suggest that a task's state can be polled - but that really
sucks IMO. I couldn't find a way to subscribe to a 'death event' for a
task - is there one?
It seems to me that it would make life much easier in terms of robustness.
Also, it would be handy to bind channels to tasks so that they
automatically become invalidated if there is no longer a consumer.
Also for a port, it is not clear what happens if a task is blocked in
comm::recv and the port should be closed or otherwise invalidated (I
would hope to return in an error state) or if some timeout occurs and I
want to wake up - I know it is possible to peek but that suggests a
polling structure again if one doesn't want to get stuck with tasks in
recv when you want to tear down some or all of the app.
Thanks
James
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev