Mr-Markus / ZigbeeNet

A .NET Standard library for working with ZigBee
Eclipse Public License 1.0
131 stars 47 forks source link

Consider removing the call to .Result and use async/await all the way. #40

Closed nicolaiw closed 4 years ago

nicolaiw commented 5 years ago

https://github.com/Mr-Markus/ZigbeeNet/blob/develop/libraries/ZigBeeNet/ZCL/ZclCluster.cs#L352

https://github.com/Mr-Markus/ZigbeeNet/blob/develop/libraries/ZigbeeNet.Hardware.ConBee/ZigbeeDongleConBee.cs#L58

We should avoid to call Task.Result. Instead we should use async/await.

Mr-Markus commented 5 years ago

I can't find any Task.Result calls anymore. So this issue can be closed in my opinion

nicolaiw commented 4 years ago

Hello Markus,

would you mind to reopen this issue as a reminder ? Maybe I will find the time to have a look at this.

Regards, Nicolai

nicolaiw commented 4 years ago

https://stackoverflow.com/questions/47284290/when-is-the-best-place-to-use-task-result-instead-of-awaiting-task