Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1672
| From | Alexey <lehin.p@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | CheckAbort inside MathLink functions? |
| Date | 2011-04-14 08:58 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <io6cus$do8$1@smc.vnet.net> (permalink) |
Hello, It seems that that such MathLink functions as LinkWrite and LinkRead have something like its own internal CheckAbort that absorbs user-generated aborts, and does not propagate them further. This can be easily shown with LinkRead: link = LinkLaunch[First[$CommandLine] <> " -mathlink"]; LinkRead[link]; LinkWrite[link, Unevaluated[Pause[100]]]; CheckAbort[AbortProtect[Print[LinkRead[link]]], Print["!!"]] If we press Alt+. after evaluating the above code we get only the following output: During evaluation of In[6]:= ReturnPacket[$Aborted] But Print["!!"] is not evaluated although we have generated Abort[] exactly inside CheckAbort. One can see that the abort we made by pressing Alt+. was absorbed by LinkRead. My problem is that it breaks my own flow control of evaluation based on CheckAbort. Is there a way to intercept aborts absorbed by such functions as LinkRead and LinkWrite for having ability to catch user-generated aborts? Alexey
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
CheckAbort inside MathLink functions? Alexey <lehin.p@gmail.com> - 2011-04-14 08:58 +0000
csiph-web