All Manuals > LispWorks® User Guide and Reference Manual > 42 The MP Package

initialize-multiprocessing Function

Summary

Initializes multiprocessing before use.

Package

mp

Signature

initialize-multiprocessing &rest main-process-args => nil

Arguments
main-process-args
A set of arguments for process-run-function.
Description

The function initialize-multiprocessing initializes multiprocessing, and it does not return until multiprocessing is finished.

initialize-multiprocessing applies the function process-run-function to each of the entries in *initial-processes* to create the initial processes.

When called with main-process-args, it creates a mp:process object for the initial thread using the arguments in that list as if in the call:

(apply 'mp:process-run-function main-process-args)

Supplying main-process-args is useful on macOS if you want to run a pure Cocoa application, since the main thread needs to run the Cocoa event loop.

It is not necessary to call initialize-multiprocessing when the LispWorks IDE is running (that is, after env:start-environment has been called), as this automatically starts up multiprocessing.

You can supply the :multiprocessing t arguments to save-image to save an image that starts up with multiprocessing.

Notes

On Microsoft Windows, Linux, x86/x64 Solaris, FreeBSD and macOS (using the Cocoa image), the LispWorks IDE starts up by default.

See also

*initial-processes*
process-run-function


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:51