Skip to content

Aborting change query #191

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

Closed
aviz opened this issue May 27, 2015 · 4 comments
Closed

Aborting change query #191

aviz opened this issue May 27, 2015 · 4 comments

Comments

@aviz
Copy link

aviz commented May 27, 2015

I could not find a way to abort a change query.

Next() is blocking... and while Next is blocking i found no way to stop it's execution.
I tried to call close, but it ended with crash due to double socket close.

@dancannon
Copy link
Collaborator

Hi @aviz, Thanks for creating the issue.

Calling Close should work so there is probably a bug there causing the crash however I am also not sure if closing the cursor is the best way of stopping the query. I will look into fixing this issue after the 1.0 release of the driver.

@aviz
Copy link
Author

aviz commented May 28, 2015

I'v made a temporary fix to this at https://github.com/aviz/gorethink
The fix should be applied on the closed flag.. but i did not wanted to diverge too much from original code.

The idiomatic way of closing the cursor is by notifying a channel in my opinion.

@dancannon
Copy link
Collaborator

@aviz I agree with your idea of using a channel but I think it makes sense to get a fix out quickly. That being said I think we should probably use closed instead of adding a new flag that does the same thing.

@dancannon dancannon modified the milestones: Version 1.0, Version 1.1 May 29, 2015
@dancannon dancannon self-assigned this May 29, 2015
@dancannon
Copy link
Collaborator

Merged the fix to master. Thanks for the help @aviz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants