How is try/catch handled, in this context?
For example:
routine=: {{
try.
6!:3 y
'done'
catch.
'caught'
end.
}}
routine 5 NB. then run jbreak once:
caught
Thanks,
--
Raul
On Thu, Apr 14, 2022 at 12:18 PM Henry Rich <[email protected]> wrote:
>
> The next beta will support jbreak in multiple threads, as follows:
>
> Recall that running jbreak once raises the ATTN condition. This is a
> gentle tap on the shoulder, asking JE to stop at the start of a new
> sentence. A thread that is stopped by ATTN can be restarted reliably.
> Running jbreak a second time raises the BREAK condition. This poleaxes
> JE into immediate insensibility, possibly in the middle of a sentence,
> and you are on your own to decide whether continuation is feasible.
>
> When debug suspension is disabled, a single jbreak will be detected by
> the first task that starts a sentence. That task will fail with an
> 'attention interrupt' error. The system will then automatically
> simulate a second jbreak to force quick termination of all other tasks
> with the 'break' error. If the user issues a second break before the
> ATTN has been noticed, it will force immediate termination of all tasks
> with the 'break' error.
>
> When debug suspension is enabled, a single jbreak will be noticed by all
> tasks when they start a sentence or when they wait for a pyx after
> another task has noticed the break. After all tasks have noticed the
> break, the system enters debug suspension. The first thread that
> noticed the break will be the debug thread and the others will be
> dormant until execution is resumed. If the user issues a second break
> before the ATTN has been noticed, all tasks will interrupt their
> sentences as soon as possible to enter debug suspension with the 'break'
> error. You are on your own to decide whether continuation is feasible.
>
> There is no automatic detection of deadlock. double-jbreak is the only
> way out of deadlock/livelock.
>
> Henry Rich
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm