1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-23 09:07:37 +01:00

- switched to 'bordeaux threads' API version 2.

This commit is contained in:
cage 2025-01-05 17:12:49 +01:00
parent 76e1f004d4
commit df42de887b

View File

@ -1019,7 +1019,7 @@ to the array"
;; threads
(defmacro with-lock-held ((lock) &body body)
`(bt:with-lock-held (,lock)
`(bt2:with-lock-held (,lock)
,@body))
(defmacro defun-w-lock (name parameters lock &body body)
@ -1031,34 +1031,34 @@ to the array"
(with-lock-held (,lock)
,@remaining-forms))))
(defparameter *thread-default-special-bindings* bt:*default-special-bindings*)
(defparameter *thread-default-special-bindings* bt2:*default-special-bindings*)
(definline make-thread (function &key (name nil) (initial-bindings *thread-default-special-bindings*))
(bt:make-thread function :name name :initial-bindings initial-bindings))
(bt2:make-thread function :name name :initial-bindings initial-bindings))
(definline make-lock (&optional name)
(bt:make-lock name))
(bt2:make-lock :name name))
(definline make-condition-variable (&key (name nil))
(bt:make-condition-variable :name name))
(bt2:make-condition-variable :name name))
(definline condition-wait (condition-variable lock &key (timeout nil))
(bt:condition-wait condition-variable lock :timeout timeout))
(bt2:condition-wait condition-variable lock :timeout timeout))
(definline condition-notify (condition-variable)
(bt:condition-notify condition-variable))
(bt2:condition-notify condition-variable))
(definline join-thread (thread)
(bt:join-thread thread))
(bt2:join-thread thread))
(definline destroy-thread (thread)
(bt:destroy-thread thread))
(bt2:destroy-thread thread))
(definline threadp (maybe-thread)
(bt:threadp maybe-thread))
(bt2:threadp maybe-thread))
(definline thread-alive-p (thread)
(bt:thread-alive-p thread))
(bt2:thread-alive-p thread))
;; http