geos icon indicating copy to clipboard operation
geos copied to clipboard

Add functions to interrupt processing in a specific thread/context

Open dbaston opened this issue 2 years ago • 7 comments

This PR is an alternative API to #761. Instead of registering an interrupt handler for the calling thread -- which is a bit awkward, the handler is registered with the context handle. Since the C++ library has no notion of a context handle, the C API registers and unregisters the interrupt handler with every C API call. To avoid a significant performance penalty for very short C API functions, the C API execute error handler is modified so that functions can be tagged as noninterruptible so the interrupt handler will not be registered when they are called.

dbaston avatar Jan 20 '23 15:01 dbaston

@macdrevx @nyalldawson My understanding is that this API is preferable to #761 for your use cases, but I'm inclined to let this PR sit until you've had a chance to test it (on your own timeline) in case it's difficult to use in a way I didn't anticipate. Does that make sense?

dbaston avatar Feb 27 '23 19:02 dbaston

Going to land this or #761 for 3.12?

pramsey avatar Jun 07 '23 16:06 pramsey

How far are we from landing this in 3.13?

robe2 avatar Feb 26 '24 01:02 robe2

Is this waiting on further feedback? I would LOVE to see this land in a geos release soon 🤞

nyalldawson avatar Aug 26 '24 21:08 nyalldawson

@nyalldawson if you're happy with it, then I think all that remains would be to address the good suggestions from @macdrevx . @pramsey , is there a target release date for 3.13?

dbaston avatar Aug 26 '24 21:08 dbaston

@dbaston I like this approach!

nyalldawson avatar Aug 27 '24 02:08 nyalldawson

is there a target release date for 3.13?

Mid-September. I'd say we're "almost there", so if you feel good about this, merge it and I will roll the next beta, in anticipation of a release after testing.

pramsey avatar Aug 27 '24 17:08 pramsey

hmm this has been sitting here for quite sometime. Is anyone going to do anything with this or just let it die a very slow death.

robe2 avatar Mar 12 '25 18:03 robe2

Well, it needs some janitorial work now before it can merge, but more important is if @dbaston still likes it?

pramsey avatar Mar 12 '25 19:03 pramsey

Should be reasonable to finish this up before the next release.

dbaston avatar Mar 13 '25 13:03 dbaston