Closed nicolaiw closed 4 years ago
Task.Run does not allow to pass TaskCreationOptions.LongRunning, so shouldn't we use Task.Factory.StartNew instead?
also there is the same problem here: https://github.com/Mr-Markus/ZigbeeNet/blob/065fc7f402efd82a3333155edc756214caade1a3/libraries/ZigBeeNet.Transport.SerialPort/ZigBeeSerialPort.cs#L99-L102
ur right .. this should be changed as well .. I would agree .. StartNew() would be an option .. another topic is the call to Task.Result in this project .. this should be avoided ..
fixed in PR #90
Good improvement
https://github.com/Mr-Markus/ZigbeeNet/blob/065fc7f402efd82a3333155edc756214caade1a3/libraries/ZigBeeNet/Database/ZigBeeNetworkDatabaseManager.cs#L164
see: https://stackoverflow.com/questions/29693362/regarding-usage-of-task-start-task-run-and-task-factory-startnew