gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Disable a warning?


From: Pascal J . Bourguignon
Subject: Re: [Gcl-devel] Disable a warning?
Date: Fri, 13 Aug 2004 08:23:08 +0200

Jared Davis writes:
> Basically I am using an external program to queue up commands for GCL 
> from multiple external sources. 

Then I'd use several threads, each with its own socket and its own
REPL (for example, using my server-repl, or something else, since you
may want to add your own protocol).  If you have threads, then it does
not matter if you've received only a partial defun and a read in one
of the  threads blocks waiting for the rest.

If you can't or don't want to use threads, then you can still run
several sockets at the same time, either polling them  (LISTEN) or
waiting for I/O with poll(2) or select(2). Collect sexps in
per-connection buffers, and when you've got complete sexps (which you
can test with READ-FROM-STRING), send them your REPL.

Ask you this question: without threads, what happens when one client
sends: (let ((i 0)) (loop (incf i))) ?


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.




reply via email to

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