Trying to implement the following paragraph stated in the topic 16.2 from Rust Book.
The try_recv method doesn’t block, but will instead return a Result<T, E> immediately: an Ok value holding a message if one is available and an Err value if there aren’t any messages this time. Using try_recv is useful if this thread has other work to do while waiting for messages: We could write a loop that calls try_recv every so often, handles a message if one is available, and otherwise does other work for a little while until checking again.
But the code did not result in receiving the message.
[messageEx]
(rajkrustlearn/messageEx.zip at main · rbalasakuri/rajkrustlearn · GitHub)
Need to know what's wrong in my code.