3

I am working with SBCL (SBCL 1.2.13.84-7d75f89) learning Common Lisp from this book. I have run into a problem, trying to find and load the package named multiprocessing.

(This is in Chapter 29 of the book)

I have tried doing (ql:system-apropos "multiprocessing"), (ql:system-apropos "thread"), (ql:system-apropos "smp") trying to see if there is a quicklisp package that uses it.

I have also searched using google, and even at Quickdocs but I seem to be failing somewhere.

I would be grateful for any assistance.

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
fredmanglis
  • 487
  • 1
  • 5
  • 10
  • The chapter says "Finally, the lock slot holds a process lock created with the function make-process-lock, which is part of Allegro's MULTIPROCESSING package. ", so I guess you would have to use Allegro for that. Or implement the necessary features yourself. – jkiiski Feb 20 '16 at 14:12
  • 2
    Looking over the chapter, it seems like the `with-process-lock` and `make-process-lock` are pretty much identical to sbcl's [`with-mutex`](http://sbcl.org/manual/index.html#Mutex-Support) and `make-mutex`. You could also use [bordeaux threads](https://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation) which has `make-lock` and `with-lock-held` that should do the same thing as well. – jkiiski Feb 20 '16 at 14:25

1 Answers1

7

The example in the book uses the web server AllegroServe from Franz Inc. and the corresponding Allegro Common Lisp (ACL). ACL has a package named multiprocessing which provides the needed multiprocessing facilities.

The book proposes to use PortableAllegroServe for those who don't use Allegro Common Lisp. See chapter 26 in the book.

PortableAllegroServe has a package named acl-compat.mp, which provides the necessary functionality in a portable way. For example acl-compat.mp:with-process-lock, acl-compat.mp:make-process-lock, ...

You thus need to either

  • AllegroServe and Allegro Common Lisp
  • PortableAllegroServe and a Common Lisp implementation it runs in

The names of the packages will be slightly different, though.

Note that this chapter is one which might need some updating. I'm not sure how much PortableAllegroServe is used these days...

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
  • Thanks. I'd already tried using the idea presented in jkiiski comment on [bordeaux threads](https://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation) and that worked. I also played around in slime with the acl-compat.mp and it seems to also work. – fredmanglis Feb 21 '16 at 08:58