LinkInterrupt

LinkInterrupt[link]
sends an interrupt to the program at the other end of the specified WSTP connection.

DetailsDetails

  • link must be an active LinkObject, as returned by functions such as LinkLaunch or Links.
  • It is up to the external program to determine how it will handle the interrupt.
  • External programs created from WSTP templates will by default set the global variable if they receive an abort.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Launch a subsidiary Wolfram Language kernel process:

In[1]:=
Click for copyable input
Out[1]=

Read the first packet:

In[2]:=
Click for copyable input
Out[2]=

Send an infinite loop program:

In[3]:=
Click for copyable input

Use LinkReadyQ to check whether the program has finished:

In[4]:=
Click for copyable input
Out[4]=

Send an interrupt:

In[5]:=
Click for copyable input

The process has stopped with an interrupt menu:

In[6]:=
Click for copyable input
Out[6]=

Close the link:

In[7]:=
Click for copyable input
Introduced in 1996
(3.0)