Difference between try_get() and can_get()

hello friends,

Can anyone help me to explain what’s the difference between try_get() & can_get() method with example?

please also let me know that where it can be used?

try_get will attempt to get a value from the channel. If successful, it modifies its argument and removes the value from the channel just like get(), and returns a status.

can_get() will not get the value, it just returns the status.

-Kurt

thanx a lot sir.

Nice way to explain the difference