Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multithreading on CLISP-2.29

7 views
Skip to first unread message

John S. Rodrigues

unread,
Aug 22, 2002, 10:31:56 PM8/22/02
to
I am a LISP rookie.

How do I use multi-threading in CLISP-2.29 ? I tried using the threads
package, but I get the message "No package called threads". There is a
threads.lisp file in the CLISP source. What am I missing??

Thanks,
John.

Included below is the code I am trying to 'multi-thread'. It's my
prototype server.

;;;;(use-package 'threads)

(defun server (port)
(let ((server (socket-server port)))
(unwind-protect
(loop
(let ((socket (socket-accept server)))
(handle-connection socket))
;; TODO - find out howto make threads:
;;(make-thread (format nil "Socket handler for socket ~A@~A~%"
;; (socket-stream-host socket)
;; (socket-stream-port socket))
;; #'handle-connection socket))
)
(format t "Closing socket server~%")
(socket-server-close server))))

(defun handle-connection (socket)
(format t "Received packet from ~A port ~A~%"
(socket-stream-host socket)
(socket-stream-port socket))
(format t "Socket status = ~A~%"
(socket-status socket))
(do ((x (read-line socket nil nil) (read-line socket nil nil)))
((or (null x)
(null (socket-status socket))
(equal :error (socket-status socket)))
(progn
(format t "DEBUG!! - x-val ~A~%" x)
(format t "Closing the socket!!~%")
(close socket)))
(format t "~A~%" x)))

Bill Clementson

unread,
Aug 23, 2002, 12:31:18 PM8/23/02
to
"John S. Rodrigues" <john...@airmail.net> writes:

> How do I use multi-threading in CLISP-2.29 ? I tried using the threads
> package, but I get the message "No package called threads". There is a
> threads.lisp file in the CLISP source. What am I missing??

The Sourceforge site for CLISP has a "tasks" page at the following URL:
http://sourceforge.net/pm/?group_id=1355

One of the tasks listed is "Multi-Threading" with a description of
"Finish the MT code (see multithread.txt and xthread.d)". You might want
to follow-up on the CLISP list to find out what the status of the
multi-threading task is.

--
Bill Clementson

0 new messages