I have a c# function called by matlab, which takes long time to process. Also, I need the ability to raise a c# flag (used for aborting the process) from a UI .
So I need to do something like the follow:
The problem is, the "abort" button callback is executed only after the long function finished - which mean I can't abort the process.
what can i do to solve this problem? should i consider another method?