Next: , Previous: Package FL.ALIEN, Up: Reference manual


6.9 Package FL.MULTIPROCESSING

This package provides an interface for allowing parallel execution in Femlisp. It abstracts also from the underlying Lisp's threading features. Unfortunately, these features somewhat differ (e.g. the waitqueue concept in SBCL and gates in Allegro), although one can usually achieve the same effects.

— Variable: *THREAD-LOCAL-MEMOIZATION-TABLE*

Dynamic variable specialized for each worker thread separately. Should not be used globally.

— Variable: *THREADS*

The number of threads in which Femlisp tries to split the work for some computationally intensive tasks. If NIL, no threading is used.

— Function: CONDITION-NOTIFY WAITQUEUE

Notifies on the waitqueue.

— Function: CONDITION-WAIT WAITQUEUE MUTEX

Registers on the waitqueue, releases mutex, and waits for a notification on the waitqueue.

— Function: MAKE-THREAD FUNC &KEY NAME INITIAL-BINDINGS

Execute func as a thread with name name within dynamic bindings given by initial-bindings.

— Function: MAKE-WAITQUEUE

Generates a waitqueue.

— Class: MUTEX-MIXIN

A mixin which adds a mutex to every instance of the class.

Direct slots:

— Class: PARQUEUE

A thread-safe queue waiting for input.

Superclasses: QUEUE WAITQUEUE-MIXIN

Direct slots:

— Macro: WITH-MUTUAL-EXCLUSION (OBJ) &BODY BODY

Execute body on the waitqueue obj without other threads interfering.

— Macro: WITH-WORKERS (FUNC) &BODY BODY

This macro distributes work generated in body with calling the locally bound function work-on on some arguments to several working threads which call func on those arguments.