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

[QUESTION] What's the difference between sig_on inside try: block versus sig_on_no_except? #205

Open
user202729 opened this issue Oct 24, 2024 · 0 comments

Comments

@user202729
Copy link

Looking at the documentation, the following two appears to be functionally the same:

data = malloc(...)
try:
	sig_on()
except KeyboardInterrupt:
	free(data)
	raise

compute(data)
sig_off()

and

data = malloc(...)
if not sig_on_no_except():
	free(data)
	cython_check_exception()

compute(data)
sig_off()

Is there any difference? If not, then what's the advantage of sig_on_no_except()?

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

1 participant