-
Notifications
You must be signed in to change notification settings - Fork 127
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
CancellationToken support? #343
Comments
Hi @jakejscott , actually no. But, I really would like to if you can share me the detailed explanation and which scenario. Can you expand this thread to let me understand it further? |
@mikependon why not? This is necessary to cancel long-running operations (like batch insert). There must be a way to stop an operation that is no longer needed. Or you will have to wait for its end. |
TBH, I know this is quite needed in some cases, but such request has not been triggered after this. The user closes the request ticket without providing enough information. Happy to reopen this if you can provide same samples, scenarios and/or recommendations. Also, I think I need to spend time researching what happened to the DB Provider side if the operation has been executed already, but a cancel has been requested. |
This could be related to this dotnet/runtime story. |
@jakejscott @SergerGood - I can easily add the Remember, you do not have access to the What's your preference? |
It will be like this for example 5580088
|
@SergerGood - I am actually doing this one already, but it is only for |
I have not seen use of undo for synchronous operations when working with DbCommand... |
…xecute methods." This reverts commit 9f24bd6.
May i ask why not used default? |
I think to force it to be nullable instead for the reason of overloaded methods. There might be case that the user will never ever pass a value to it, and placing a default would force the execution to an overloaded method of the underlying I used to do it this way. using (var reader = cancellationToken.HasValue ? await command.ExecuteReaderAsync(cancellationToken.Value) : await command.ExecuteReaderAsync())
{
...
} And by having a default, would force it to the |
|
Yeah, in such a case, you can always pass it on the nullabe argument right? The behavior is to make sure not affecting as well all the previous implementations. |
If used as a parameter with a default value, it has no effect for all the previous implementations.
|
@SergerGood - you are correct on pushing this, they are passing the default value here. Great sleuthing! |
Relating the recent found bugs at #601. |
@SergerGood - I have to remove the explicit calls you made for |
@mikependon - I think that it is ok) |
@SergerGood - I am done with the changes, but we have some failing Unit and Integration Tests. Will work on this soon. In the meanwhile, would you be able to do a double check while I am fixing the failing tests? Thanks |
#343 Fixed the failing Integration Tests for SqLite and MySQL.
This is now available at RepoDB v1.12.4. Please see the actual release here. |
The impact to this is very minimal, or almost 0. I just finalized this feature to ensure we do not have technical debt in relation to the CancellationToken and cancellable Async calls.
Setting this one to close now. |
Hey ya, do you have any plans to support CancellationToken's?
The text was updated successfully, but these errors were encountered: