How to make external Mathematica functions interruptible?

Posted by Szabolcs on Stack Overflow See other posts from Stack Overflow or by Szabolcs
Published on 2011-11-26T15:41:36Z Indexed on 2011/11/27 9:50 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

I had an earlier question about integrating Mathematica with functions written in C++.

This is a follow-up question:

If the computation takes too long I'd like to be able to abort it using Evaluation > Abort Evaluation. Which of the technologies suggested in the answers make it possible to have an interruptible C-based extension function? How can "interruptibility" be implemented on the C side?

I need to make my function interruptible in a way which will corrupt neither it, nor the Mathematica kernel (i.e. it should be possible to call the function again from Mathematica after it has been interrupted)

© Stack Overflow or respective owner

Related posts about c

    Related posts about interop