gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: Server sockets with GCL?


From: Helmut Eller
Subject: Re: [Gcl-devel] Re: Server sockets with GCL?
Date: Thu, 06 May 2004 23:23:34 +0200
User-agent: Gnus/5.110001 (No Gnus v0.1) Emacs/20.7 (gnu/linux)

Camm Maguire <address@hidden> writes:

>    Presumably one does want to assign some function to handle the i/o
>    on the socket *in the background* while returning control to the
>    user, no?  Would it not also be preferable to have some sort of
>    attach/detach procedure like in gdb to connect and disconnect from
>    a running process?

CMUCL's SERVE-EVENT[*] mechanism is a relatively convenient way to do
multiplexing.  It's an interface to select.  The basic idea is that
you add handler functions to file descriptors and the handler gets
called when the descriptor becomes readable or writable.

I'd like to note that multiplexing is not only interesting for
sockets, but for all kinds of file descriptors, e.g., pipes to
subprocesses.  I think it would be a mistake to build the multiplexing
functionality directly into the socket interface (Lispworks does that
unfortunately); it would be better to keep provide a separate
mechanism like CMUCL does.

A SIGIO based mechanism would be cool, because this allows some neat
tricks that are difficult to do with select().  Signal driven IO has
the reputation of not being very portable, so it might be better to
start with a select based implementation and add SIGIO later, when the
need arises.

Helmut.

ftp://ftp.linux.org.uk/pub/lisp/cmucl/doc/cmu-user/serve-event.html#toc225




reply via email to

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