[]Save and Threads

General APL language issues

[]Save and Threads

Postby paulmansour on Fri Aug 13, 2010 1:54 am

Hi all,

I'm looking at providing some debugging aids for a new desktop app. Obviously one nice thing to provide on an error is a saved, suspended copy of the WS, to be sent back to the support team in the home office, which is trivial with []SAVE. However, if you have any threads running, []SAVE does not work. Any work arounds for this? Is this a fundamental unsolvable problem with threads, or is it something that might get enhanced in future versions?

Also, are there other common techniques I should be looking at to accomplish the same goal - debugging a problem off site?

Thanks for any pointers.

Paul
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm

Re: []Save and Threads

Postby Vince|Dyalog on Fri Aug 13, 2010 9:46 am

Hi Paul,

There is an undocumented method you could use:
2 ⎕NQ '.' 'dumpws' filename
where filename is a unique char vector you could generate, such as
'c:\mysnapshots\saved_13Aug2010_11am.cor'

This method creates a file which is in the same format as our aplcores. You should then be able to ⎕CY from this dump file. Please note that ⎕CY will only be able to get local variables from the currently running thread in the file. So, you might like to create global variables with enough information about where your program is and what it is doing.

You could also write to your own external log file.

We might be able to ⎕SAVE with running threads in some future version.

Regards,

Vince
Vince|Dyalog
 
Posts: 412
Joined: Wed Oct 01, 2008 9:39 am

Re: []Save and Threads

Postby paulmansour on Fri Aug 13, 2010 12:06 pm

Vince,

Thanks, very helpful.

Paul
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm


Return to Language

Who is online

Users browsing this forum: Google [Bot] and 1 guest