async: add simple wrapper around bordeaux-threads:make-thread

This commit is contained in:
Helmut Merz 2025-09-07 17:47:42 +02:00
parent 115121ec9f
commit b3c03fcde5

View file

@ -5,7 +5,8 @@
(:local-nicknames (:lp :lparallel)
(:lpq :lparallel.queue)
(:util :scopes/util))
(:export #:+quit-message+ #:init #:finish #:make-mb #:make-task #:rcv #:try-rcv #:snd
(:export #:thread
#:+quit-message+ #:init #:finish #:make-mb #:make-task #:rcv #:try-rcv #:snd
#:mailbox #:task #:restartable-task #:behavior #:get-status #:set-status
#:submit-task #:receive-result #:try-receive-result))
@ -13,6 +14,11 @@
(defconstant +quit-message+ :quit)
;;;; simple anonymous thread with callback
(defun thread (fn cb &rest args)
(bt:make-thread (lambda () (funcall cb (apply fn args)))))
;;;; general definitions (lparallel wrappers)
(defun init ()