A designator for a function of two arguments, which returns
t if they should be regarded as the same and
A designator for a function of one argument, which returns a hash value.
nil, or one of the keywords
A generalized boolean.
A designator for a function of two arguments.
The standard definition of
make-hash-table is extended such that test can be any suitable user-defined function, except that it must not call process-wait or similar
mp package functions which suspend the current process. If test is not one of the standard test functions (
equalp), and if hash-function is not supplied, then the hash value is the same as would be used if test were
If weak-kind is non-nil, it makes hash-table weak. Its semantics are the same as the second argument of set-hash-table-weak, that is:
(make-hash-table :weak-kind weak-kind <other-args>)
single-thread, if true, tells
make-hash-table that the table is going to be used only in single thread contexts, and therefore does not need to be thread-safe. Single thread context means that only one thread can access the table at any point in time. That may be because the table is used only in one thread, but it can also be the case if the table is only ever accessed in the scope of a lock. Making a table with single-thread makes access to this table faster, but not thread-safe. It does not have other effects. The default value of single-thread is
free-function adds a "free action" for a weak hash table. This has an effect only if
make-hash-table is called with weak-kind non-nil. The free-function is called after an entry is automatically removed by the garbage collector (GC). If weak-kind is
nil, free-function is ignored.
free-function, if supplied, must take two arguments: key and value. When an entry is removed from a weak table hash-table because the relevant object is not pointed by any other object, the key and the value are remembered. Some time later (normally short, but not well-defined) the free-function is called with key and value as its arguments.
free-function needs to be fast, to avoid delays in unexpected places. Otherwise there are no restrictions on what free-function does. In particular, it can keep the key or value alive by storing them somewhere.
Objects are removed from the table when the GC has identified them as free. For long-lived objects, which normally get promoted to higher generations, that may be quite a long time after the last pointer to them has gone.
free-function can also be specified in a call to set-hash-table-weak.
LispWorks User Guide and Reference Manual - 13 Feb 2015