[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question about handling SIGINT properly in Guile

From: Maxime Devos
Subject: RE: Question about handling SIGINT properly in Guile
Date: Mon, 15 Apr 2024 00:50:30 +0200

Sent from Mail for Windows

From: Vijay Marupudi
Sent: Saturday, 13 April 2024 22:24
To: Olivier Dion;
Subject: Re: Question about handling SIGINT properly in Guile

> So there is two things with signals.  First, when a process get a signal
> queued, the OS only deliver the signal -- at least on linux -- when
> going back to user-space.  Typically, before the process get
>> re-scheduled or after a system call.  So sending a signal is not
>> immediate.  Furthermore, Guile also queues the signals and deliver them
>> to threads with async marks I think.

>I understand. I don't get this problem with C, so I assume it's the
>asynchronity of Guile that is my issue. I tried running the
>scm_async_tick function, which the documentation says runs queued asyncs
>(by providing a 'safe point', but that doesn't seem to change anything.

scm_async_tick is a thing for loops in C code, to make them interruptible (in 
this case, in the sense that an async can be run).

Somewhere in the Scheme->bytecode compiliation process, the bytecode equivalent 
to scm_async_tick is automatically inserted in various cases (I don’t recall 
all cases, but at least this is the case in loops).  – you don’t need to 
manually scm_async_tick to make it possible to run the async. (Barring any 

(Now reading the previous e-mails ...)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]