[Top][All Lists]

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

[MIT-Scheme-devel] callbacks

From: Matt Birkholz
Subject: [MIT-Scheme-devel] callbacks
Date: Fri, 11 Mar 2005 22:38:38 +0000

> From: Matt Birkholz <address@hidden>
> Date: Thu, 10 Mar 2005 10:03:52 +0000
> [...]  SWAT went to some pains to avoid callbacks.  Is there any
> hope for something like guile-gnome in MIT/GNU Scheme?
> Would I need a new kind of primitive that gets off the current
> stacklet [...] or sump'n?

Hang on, sorry.  I just described scheme_to_interface.

I am trying to get a grip on the implications of calling back and
forth.  I do not want to accumulate C frames by not returning from
Scheme, or exit prematurely by returning from Scheme once too many

I think SWAT's technique will do.  It does not seem critical that
signals be handled immediately -- before returning from the callback
function to the main loop.  The callbacks can be enqueued and run by a
Scheme thread.

The main loop looks like the nut needing cracking.  GTk's main loop
needs to run timeout, input, and idle functions if things like the
canvas are going to work.  I assume GTk is using SIGALRM, so Scheme's
thread timer would have to be implemented by a GTk timeout function.
Ideally the idle function would be removed when Scheme has no runnable
threads, and input or timeout functions would be added when Scheme has
threads waiting on input ports or timeouts.

I assume the ringing silence here means I am not duplicating other
efforts.  Full speed ahead!?

reply via email to

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