Common Lisp Package: CLSQL-FLUID-BT

Fluids implemented around Bordeaux-Threads.

README:

FUNCTION

Public

FLUID-LOCK (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FLUID-VALUE (FLUID &OPTIONAL (THREAD (CURRENT-THREAD)))

Answer two values: the value of FLUID for THREAD, and whether a value is present.

SETFFLUID-VALUE (NEW-VALUE FLUID &OPTIONAL (THREAD (CURRENT-THREAD)))

Alter the value of FLUID for THREAD to NEW-VALUE, answering NEW-VALUE.

Undocumented

SETFFLUID-LOCK (NEW-VALUE INSTANCE)

MAKE-FLUID (&KEY ((LOCK DUM0) (MAKE-LOCK)) ((TABLE DUM1) (MAKE-HASH-TABLE TEST #'EQL)) ((GC-FUNCTION DUM2) #'IDENTITY) ((GC-COUNT DUM3) 0) ((GC-FREQUENCY DUM4) 30))

Private

CURRENT-THREAD

Returns the thread object for the calling thread. This is the same kind of object as would be returned by MAKE-THREAD.

FLUID-GC (FLUID)

Clean up FLUID. *Assume it is locked in this thread.*

FLUID-GC-COUNT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FLUID-GC-FREQUENCY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FLUID-GC-FUNCTION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

FLUID-TABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

MAKE-LOCK (&OPTIONAL NAME)

Creates a lock (a mutex) whose name is NAME. If the system does not support multiple threads this will still return some object, but it may not be used for very much.

THREAD-ALIVE-P (THREAD)

Returns true if THREAD is alive, that is, if DESTROY-THREAD has not been called on it.

Undocumented

COPY-FLUID (INSTANCE)

SETFFLUID-GC-COUNT (NEW-VALUE INSTANCE)

FLUID-P (OBJECT)

MACRO

Private

WITH-LOCK-HELD ((PLACE) &BODY BODY)

Evaluates BODY with the lock named by PLACE, the value of which is a lock created by MAKE-LOCK. Before the forms in BODY are evaluated, the lock is acquired as if by using ACQUIRE-LOCK. After the forms in BODY have been evaluated, or if a non-local control transfer is caused (e.g. by THROW or SIGNAL), the lock is released as if by RELEASE-LOCK. Note that if the debugger is entered, it is unspecified whether the lock is released at debugger entry or at debugger exit when execution is restarted.

CLASS

Private

FLUID

A container for a different value in each thread. Values are not inherited.