You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to indeterminate nature of execution of these lines:
t1.await.unwrap();
t2.await.unwrap();
I understand that the above shown output is not unexpected during the first run of the client. But in cases where the server continues to run, and I run the command cargo run --bin client querying for same key (in the example) would show the output at:
GOT = Ok(Ok(Some(b"bar")))
GOT = Ok(Ok(()))
which I think is appropriate.
The text was updated successfully, but these errors were encountered:
Running below client code that has been developed to demonstrate the use of channels results in below output.
(saving the code in file
client.rs
)The output is correct but it doesn't clearly demonstrate the intent of the example. This happens because the
set
is done on the key foo in task t2 (https://github.com/tokio-rs/website/blob/master/tutorial-code/channels/src/main.rs#L70) but where as the key queried in task t1 (https://github.com/tokio-rs/website/blob/master/tutorial-code/channels/src/main.rs#L53) is hello.Due to indeterminate nature of execution of these lines:
I understand that the above shown output is not unexpected during the first run of the client. But in cases where the server continues to run, and I run the command
cargo run --bin client
querying for same key (in the example) would show the output at:which I think is appropriate.
The text was updated successfully, but these errors were encountered: