Indeed, depending on Lparallel for library has some drawbacks, namely the kernel instantiation!
One way to do this properly is to wrap the lparallel calls in (let ((lparallel:*kernel* MY-KERNEL)) ...), with MY-KERNEL being something you initialize for instance with condition-wrapper.
But really we barely need Lparallel here, as far as I can tell it's only used to pass one restart.
To replace Lparallel with BT, you can replace (lparallel:receive-result channel) with bt:condition-wait. Instead of one channel slot, you'll need 2 slots: one for the bt:condition, one of the value.
Yes, conditions or semaphores both could work here. It's just that Lparallel looked a bit prettier to me in terms of using it for prototyping. But now, yes, Bordeaux Threads are a good way to move forward!
Indeed, depending on Lparallel for library has some drawbacks, namely the kernel instantiation!
One way to do this properly is to wrap the lparallel calls in
(let ((lparallel:*kernel* MY-KERNEL)) ...)
, with MY-KERNEL being something you initialize for instance withcondition-wrapper
.But really we barely need Lparallel here, as far as I can tell it's only used to pass one restart. To replace Lparallel with BT, you can replace
(lparallel:receive-result channel)
withbt:condition-wait
. Instead of one channel slot, you'll need 2 slots: one for the bt:condition, one of the value.