For some project we load large data files using a C-API which we wrapped into a MEX file for reading into Matlab. This works well.
However, because the files are so big, loading takes a long time. Sometimes, when the thing starts loading, a user realizes he selected the wrong file or for whatever reason wants to interrupt the loading. Unfortunately, Matlab does not seem to respond to user-interupts (CTRL-C) when the MEX file is executing.
Is there some ueber-interupt that halts the MEX file?
Or is there perhaps an equivalent of pause (that will allow matlab to handle user-interrupts for a moment) that can be used in a MEX file?