Skip to content
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

Cursor.cancel() method #193

Open
nosklo opened this issue Jun 14, 2019 · 4 comments
Open

Cursor.cancel() method #193

nosklo opened this issue Jun 14, 2019 · 4 comments

Comments

@nosklo
Copy link

nosklo commented Jun 14, 2019

Can you please add support for Cursor.cancel()?

pyodbc supports it https://github.com/mkleehammer/pyodbc/blob/45395fe723b837e836643897ff3df57034c05b22/src/cursor.cpp#L2034

@nosklo
Copy link
Author

nosklo commented Jun 14, 2019

it is designed to be called from another thread, so it shouldn't use the same pool as the other commands, I believe

@jettify
Copy link
Member

jettify commented Jun 15, 2019

I do not think pool will be an issue, since query that is executing occupies one thread, and Cursor.cancel() can be executed in other one.

@jettify
Copy link
Member

jettify commented Jun 15, 2019

Would you like to submit a PR?

@nosklo
Copy link
Author

nosklo commented Oct 4, 2019

This function's purpose is to cancel a thread, therefore, it shouldn't ever be blocked waiting for the thread it is trying to cancel. It should use a separate threadpool.

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

No branches or pull requests

2 participants