[Top][All Lists]

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

Re: [Chicken-users] a couple of questions about foreign functions

From: Felix Winkelmann
Subject: Re: [Chicken-users] a couple of questions about foreign functions
Date: Thu, 22 Jan 2004 10:42:26 +0100
User-agent: Opera7.21/Win32 M2 build 3218

Am Thu, 22 Jan 2004 00:38:06 -0800 hat Valentyn Kamyshenko <address@hidden> geschrieben:

finally, I got it.
I had an impression that foreign-lambda never returns (that is, that it behaves the same way as ##core#primitive). I'd suggest to add a line to the documentation that makes it clear.

Ok, I will add a note to the manual.

Do I understand correctly, that for proper signal handling (in unix) the main branch should explicitly pass control to the scheduler? That is, e.g., if I use a library that uses (blocking) select or accept, the signals will be queued until the select (or accept) returns?
Is there a workaround?

I'm not sure I understand completely. You mean that you have the situation
that you are doing a blocking I/O operation in a library, but you want to
handle signals during that time, right?

Hm. Tricky. Signals will be registered ok, but (as you correctly point
out), until execution is resumed in compiled Scheme code, the signal
will not be handled by the user-defined signal handler. It is not
possible to execute the Scheme code exactly at the point when the OS
triggers the signal, so the only solution I currently see is to
block repeatedly with a timeout. Now when the blocking takes place
in an external library, this might not be possible. Does the
library provide some hook for interrupting and resuming the I/O
operation, or perhaps to specify a timeout?


reply via email to

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