Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Timeout
var cancellationTokenSource = new CancellationTokenSource();
//Fire a timeout after 1000 milliseconds
cancellationTokenSource.CancelAfter(1000);
var result = await device.WriteAndReadAsync(writeData, cancellationTokenSource.Token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment