-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAsyncReader CancellationToken support #638
Comments
The async methods were added before 🤔 Maybe time for a version bump |
Oh, I didn't realise @asherber added support for netstandard 2.1... well this changes my view ;) |
Hi Wade, |
Although PP targets 2.1 as well as 2.0, changing the method signature for 2.1 would involve more |
Hi,
It looks like IAsyncReader is a good candidate to add CancellationToken support:
Task<bool> ReadAsync(CancellationToken cancellationToken);
Then the first lines of the implementations of this method can check if cancellation has been requested, and call the dispose method of the IAsyncReader implementation:
A simple example of how this would make using PetaPoco more elegant,
Instead of:
Use the new CancellationToken support:
Thanks for your help and support.
The text was updated successfully, but these errors were encountered: