In the current HEAD of master, thread-interrupt! doesn't seem to consider
interrupt-level.  Is there uncommitted code?  I see that the implementation
strategy varies greatly depending on the actual thread implementation, but
if would help at least to list outlines of possible strategies in the
comment, rather than current "TODO" list.

Here are a few strategies I can think of.  Let me know if there are more
clever ways.

- If you have your own thread scheduler, you can check the status at the
time of context switch.  Unfortunately this doesn't apply for native
threads.

- Check the status at some specific points, e.g. at the entrance of
procedures, or before a blocking system calls.

- Employ a coarse interval timer and check the status periodically.

(Initially, I thought I could use Gauche's signal handling mechanism, in
which a native signal handler just set a flag, and the VM checks the flag
between VM instructions.  But I realized that, for interrupts, the VM also
needed to get current-interrupt-level, which would be a lot heaviler than
just read a flag.)

Reply via email to