First, this is a great package and I have been using it for a while with very good success. However, recently started implementing async/await TAP pattern to main program and ran into some issues with ReadAsync. It does not appear to work with implementation as shown below:
Attempt 1: The below runs inside another async method.
var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(2500));
OpcDaItemValue[] readValues = await group.ReadAsync(group.Items, cts.Token);
-- seems like the cancellation token does not have any effect
Attempt 2:: The below runs inside another async method.
var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromMilliseconds(2500));
OpcDaItemValue[] readValues = await group.ReadAsync(group.Items, cts.Token);
-- seems like the cancellation token does not have any effect
Also, if group.Items count happens to be 0, the ReadAsync fails somewhere and hangs and never returns to the caller.
First, this is a great package and I have been using it for a while with very good success. However, recently started implementing async/await TAP pattern to main program and ran into some issues with ReadAsync. It does not appear to work with implementation as shown below:
Attempt 1: The below runs inside another async method.
-- seems like the cancellation token does not have any effect
Attempt 2:: The below runs inside another async method.
-- seems like the cancellation token does not have any effect
Also, if group.Items count happens to be 0, the ReadAsync fails somewhere and hangs and never returns to the caller.