chickadee » jiffi » make-armor-lock

(make-armor-lock) → new armor locksyntax

Creates an armor lock which uses a SRFI-18 mutex to make an armor thread-safe. You must import srfi-18 in the module that calls this macro.

You can use armor-lock-set! to assign the lock to a single armor instance. You can pass locking: (make-armor-lock) to define-armor-type, to create and assign a new lock to every instance of the armor type automatically.

The implementation details of armor locks are unspecified, and may change in future versions of Jiffi. You should not do anything with an armor lock except assign it to an armor as described above.