MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Interrupt Service Routines in Mathematica v.5.2?

  • To: mathgroup at
  • Subject: [mg73925] RE: [mg73824] [mg73824] Interrupt Service Routines in Mathematica v.5.2?
  • From: "Ingolf Dahl" <ingolf.dahl at>
  • Date: Sat, 3 Mar 2007 01:04:47 -0500 (EST)
  • References: <>
  • Reply-to: <ingolf.dahl at>

Hi Januk,
My TaggedCells package (available from ) contains several ways to
achieve similar effects. You might display a status cell, where you
repeatedly write down the values of some control parameters, or display a
status progress graph according to your own choice. Or you might repeatedly
read and execute a control cell, which might change the program flow. The
control cell might be manually edited, or changed by a FrontEnd button. 
Another possibility built into Mathematica is to use the "Interrupt
Evaluation..." command in Mathematica to enter a subsession, or use the
FrontEnd command FrontEndExecute[FrontEndToken["SubsessionEvaluateCells"]].
My experience, however, is that these commands are not really mature yet,
and might cause system crashes. My private theory is that the
Kernel-FrontEnd interaction is very "single-threaded" and easily get
confused if the user and the Kernel try to communicate with the FrontEnd at
the same time. That is not really what you want when you are running a long
Best regards

Ingolf Dahl

-----Original Message-----
From: Januk [mailto:ggroup at] 
Sent: 02 March 2007 12:11
To: mathgroup at
Subject: [mg73925] [mg73824] [mg73824] Interrupt Service Routines in Mathematica

Hi all,

Is it possible to create an interrupt service routine in Mathematica v.
5.2?  While running a long calculation, I want to define some other
code that can be triggered by some event external to the calculation.
On completion of the interrupt service routine, the main calculation
should automatically resume with little or no knowledge that the
interrupt ever occurred.

The first place I would like to use this would be to monitor a long,
complicated calculation in a loop.  Each iteration through the loop
may be too slow (or too fast) for me to simply display diagnostic
information once per iteration.  I would rather display the
information every x-seconds, or when the user presses a button.

Any suggestions or comments would be appreciated.


  • Prev by Date: Re: GNU readline ability in the front end
  • Next by Date: Re: Is this the best way to Solve the Katsura 6 problem
  • Previous by thread: Interrupt Service Routines in Mathematica v.5.2?
  • Next by thread: Re: Interrupt Service Routines in Mathematica v.5.2?