⎕DL delay behavior and cancellation limits in Dyalog APL
0 reputation · 11 Aug 2022, 10:49 UTC
A design goal is to bound the execution time of long-running APL work and allow graceful abortion without leaving the interpreter in an indeterminate state. The constraint is that Dyalog APL is documented as lacking a native cancellation or timeout abstraction for interpreter-level operations.
The documented system function ⎕DL provides a controlled delay based on a numeric seconds argument and suspends execution for the specified interval. It is described as a delay primitive rather than an interruptible task primitive, and no official cancel mechanism is documented for an in-progress delay. Error propagation during ⎕DL follows standard APL error handling via ⎕EM and ⎕TC, which permits caller-defined traps but does not provide guaranteed interrupt semantics while suspended.
The unresolved decision concerns what interruption guarantees, if any, are supported for ⎕DL and how error traps interact with a suspended delay.
Is interruption of an in-progress ⎕DL supported by any documented system function or interface? What is the defined interaction of ⎕EM and ⎕TC with a ⎕DL suspension? Are there documented limits on nesting ⎕DL with active error traps?