I see. So a thread occasionally checks its interrupt queue and handles if there's any (and the interrupt level is zero), but the timing of such check is up to the implementation. Can this eventual term be written explicitly in thread-interrupt! entry? Something like:
Note: Pending interrupts aren't need to be handled immediately after current-interrupt-level drops to zero. They only need to be handled eventually. On Tue, Mar 7, 2023 at 11:15 PM Marc Nieper-Wißkirchen < marc.nie...@gmail.com> wrote: > Interrupts only need to be handled eventually. > > SRFI 226 makes no requirements on how fine-grained the implementation > has to set safe/checkpoints. > > It guarantees an eventual interrupt in code like: > > (do () (#f)) > > Does this help? > > Am Mi., 8. März 2023 um 10:11 Uhr schrieb Shiro Kawai < > shiro.ka...@gmail.com>: > > > > Suppose the following scenario: > > > > ;; starts with interrupt level zero. > > (parameterize ((current-interrupt-level 1)) > > ... > > ;; At this moment, another thread calls thread-interrupt! on this > thread > > ...) > > ;; Will the interrupt thunk be called here? > > > > Since current-interrupt-level is a thread parameter, it seems that we > can't run the code when we exit parameterize, so I wonder how I can > implement it if the answer is yes. > > > > --shiro > > >