This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Misc stuff


Lauri Alanko <la@la.iki.fi> writes:

> Why don't my signal handlers work when a signal is received during accept?
> If I first wait for a connection request with select, everything
> works.

Signals are received during accept, but their effect is delayed until
the accept call returns.  This is the case with all "critical
sections" in Guile.  I'm not sure why the accept call needs to be
inside a critical section though...

Note that nlocking in an accept call also will block all thread
switching.  This won't happen if you block on select instead.

Maybe we should build a select call into accept so that these kind of
things doesn't happen?

> What exactly are structures for? When one wants types that represent custom
> C code objects, one creates custom smobs. And structures are a bit
> cumbersome just to make custom opaque types in scheme code. A simpler
> wrapper to custom smobs would be nice.

I agree that structures are cumbersome.  They should be rewritten and
get an entirely new interface, an interface which is easy to use both
from the Scheme and C side.

But they are useful.  They allow the same data structures to be
handled both from Scheme and C, they allow for compact representation
of data although they are used from Scheme, and they may be a basis
for an OOP system.  It is not fair to compare them to smobs, since
smobs aren't accessible from the Scheme side.

> And relating to this, is there any way of creating custom objects that can
> be also called as functions? Besides the obvious, tampering with eval/apply,
> of course..

Yes, but they are not yet in a usable condition.  Look at the NEWS
file in new snapshots.  It might turn up within a few weeks.

/mdj