commit 2af733c0cc3db8db1ebdacbfaedcd92791d6ce9c
parent 50c225359a7e1ab7e90d99535037fa62d5edb07d
Author: ChanderG <[email protected]>
Date: Thu, 4 Dec 2025 15:37:38 +0530
ensure launcher explicitly waits for the print thread
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/grep.lisp b/grep.lisp
@@ -115,6 +115,7 @@
;; Main entrypoint for the grep functionality
(defun grep-launcher (str dir)
+ (log-setup)
(setf *match* str)
(setup-tasks-mgmt)
(let* ((numw 4)
@@ -126,10 +127,10 @@
(loop for i from 0 below numw
do (lq:push-queue :done *queue*))
(loop for w in workers do (bt:join-thread w))
- (lq:push-queue :done *print-queue*)))
+ (lq:push-queue :done *print-queue*)
+ (bt:join-thread print-worker)))
(defun main ()
- (log-setup)
(let* ((args (uiop:command-line-arguments))
(nargs (length args)))
(when (or (eq nargs 0) (> nargs 2))