All Manuals > LispWorks Release Notes and Installation Guide > 15 Release Notes


15.4 Multiprocessing

LispWorks supports Symmetric Multiprocessing (SMP) on Microsoft Windows, Mac OS X, Linux, FreeBSD, x86/x64 Solaris, AIX, iOS and Android platforms. Where functionality differs from other platforms, the documentation refers to "SMP LispWorks" or "Non-SMP LispWorks", as appropriate.

This section describes changes made in the multiprocessing interface since version 7.0, which are documented in the LispWorks User Guide and Reference Manual .

15.4.1 Additional functions for use with mailboxes

The new function mp:mailbox-send-limited sends an object to a mailbox as long as the mailbox has not reached a specified maximum size.

The new functions mp:mailbox-size and mp:mailbox-full-p allow the current size and fullness of a mailbox to be queried.

15.4.2 Additional arguments to mp:process-send

The function mp:process-send now has extra keyword arguments :limit and :timeout, to allow the maximum size of the process's mailbox to be controlled.

In addition, a new keyword argument :error-if-dead-p controls what happens if the process is dead and the return value is now a boolean.

15.4.3 Additional functions for use with unlocked queues

The new functions mp:unlocked-queue-count, mp:unlocked-queue-size allow the current number of objects and maximum size of an unlocked queues to be queried.

The new function mp:unlocked-queue-peek allows the first object in an unlocked queue to be retrieved without removing it.

15.4.4 Evaluation environment for initial bindings in foreign threads

The initial value forms in mp:*process-initial-bindings* are now evaluated in the dynamic environment of the new process when a foreign thread calls into Lisp. In previous releases, the evaluation occurred in a "no-process" scope, and an error would have entered the debugger in the console without an option to abort.

15.4.5 Newly exported system classes for synchronization objects

The system classes mp:barrier, mp:condition-variable, mp:lock, mp:mailbox and mp:semaphore are now exported and documented.

15.4.6 Safely using globally accessible data

Documentation has be added to describe how to safely make an object's contents accessible to other threads ("globally accessible").

The new macro system:globally-accessible allows synchronization to be performed when accessing a globally accessible slot in cases where it is not done by some other means.

See "Making an object's contents accessible to other threads" in the LispWorks User Guide and Reference Manual for more details.

15.4.7 Timers can cause themselves to be stopped

If a timer function returns the keyword :stop, then timer is unscheduled, allowing you to schedule a repeating timer that unschedules itself when some condition is true.

LispWorks Release Notes and Installation Guide - 19 Oct 2017