On Tue, Aug 27, 2019 at 7:51 PM Stephen R. van den Berg srb@cuci.nl wrote:
Chris Angelico wrote:
string show_channel_info(string name) { int id = continue return get_channel_id(name);
...
return name + " is offline.";
The intermediate values would be Concurrent.Futures; the caller would get one of them, wait on it, and then send the returned value back in. The final return value is a string.
Indeed.
Also, the following identity transformation should be possible:
int id = continue return get_channel_id(name);
is equivalent to:
Concurrent.Future fut = get_channel_id(name); int id = continue return fut;
Yes, definitely. The thing you yield is just a value, so any expression will have the same effect.
ChrisA