Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5276
| From | Alexey Popkov <lehin.p@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | How to catch interrupts generated by TimeConstrained? |
| Date | 2011-09-29 06:09 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j6123m$m2q$1@smc.vnet.net> (permalink) |
Hello, Mathematica has the CheckAbort function which allows to catch and handle user-generated and programmatic Aborts. But it does not allow to catch interrupts generated by such functions as TimeConstrained and MemoryConstrained: TimeConstrained[CheckAbort[Pause[100], Print["From CheckAbort"]], 1] (does not print "From CheckAbort"). Is there a way to catch such interrupts in Mathematica? Alexey P.S. The reason why I need this is that I have a function that creates MathLink objects which must be closed in the case of any interrupts or aborts but not in other cases.
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
How to catch interrupts generated by TimeConstrained? Alexey Popkov <lehin.p@gmail.com> - 2011-09-29 06:09 +0000 Re: How to catch interrupts generated by TimeConstrained? Peter Pein <petsie@dordos.net> - 2011-10-01 07:12 +0000
csiph-web