async: add simple wrapper around bordeaux-threads:make-thread
This commit is contained in:
parent
115121ec9f
commit
b3c03fcde5
1 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,8 @@
|
||||||
(:local-nicknames (:lp :lparallel)
|
(:local-nicknames (:lp :lparallel)
|
||||||
(:lpq :lparallel.queue)
|
(:lpq :lparallel.queue)
|
||||||
(:util :scopes/util))
|
(: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
|
#:mailbox #:task #:restartable-task #:behavior #:get-status #:set-status
|
||||||
#:submit-task #:receive-result #:try-receive-result))
|
#:submit-task #:receive-result #:try-receive-result))
|
||||||
|
|
||||||
|
@ -13,6 +14,11 @@
|
||||||
|
|
||||||
(defconstant +quit-message+ :quit)
|
(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)
|
;;;; general definitions (lparallel wrappers)
|
||||||
|
|
||||||
(defun init ()
|
(defun init ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue