[slime-devel] swank-create-server (round II)

Helmut Eller e9626484 at stud3.tuwien.ac.at
Wed Jan 21 00:03:22 UTC 2004


Marco Baringer <mb at bese.it> writes:

> imho swank-create-server is much more convient if it returns the port
> number it has opened. 4 line patch follows.
[...]
>                       
>  (defun create-swank-server (&optional (port 4005) 
>                              (background *swank-in-background*))
> -  (setup-server port #'simple-announce-function background))
> +  (let ((real-port nil))
> +    (setup-server port
> +                  (lambda (port)
> +                    (setf real-port port))
> +                  background)
> +    real-port))

There is a race condition if the server is executed in a separate
thread.  I added an announce-fn argument, until we know how to best
handle this situation.

> p.s. - am i the only one actually using create-swank-server?

Apparently :-)

Helmut.




More information about the slime-devel mailing list