Cancel task on MCR DLL (.Net library) from C#

3 次查看(过去 30 天)
Hi,
I'm trying to stop MCR DLL (.Net library) function call, running some task, from C#. Aborting the thread which runs the MCR function call is not enough, It seems that the MCR opens a thread of its own, which I don't know how to stop. In Matlab when I want to cancel the run, I press ctrl + c. is there a way to cancel MCR DLL run from C#??
Thanks, Amit

采纳的回答

Walter Roberson
Walter Roberson 2015-10-11
control-C does not terminate function calls immediately. When there are compute-intensive calls, MATLAB calls BLAS or LinPack or MLK or similar routines, and as long as those are running there is no control other than to find the thread process and kill it. You can send an interrupt signal (signal 2 in Unix type systems) to the process that called into MCR and MCR will deal with it as soon as it is able.
  4 个评论
Walter Roberson
Walter Roberson 2015-10-11
SIGINT
You can search for information about SIGINT on msdn (my link is blocked by the spam filters here :( )
amit lipman
amit lipman 2015-10-12
I'll do that, thanks you very much Walter!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Timing and presenting 2D and 3D stimuli 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by