Commit 653b2b8de331fb81892ba67c405d5bbe7c9ab441

Thomas de Grivel 2018-06-20T15:35:56

configure-threads

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/thot-threaded.lisp b/thot-threaded.lisp
index 1efd812..210a068 100644
--- a/thot-threaded.lisp
+++ b/thot-threaded.lisp
@@ -54,11 +54,12 @@
   (and bordeaux-threads:*supports-threads-p*
        (not *disable-threads*)))
 
-(defun maybe-configure-threaded ()
-  (when (threaded-p)
-    (setf *main-loop* #'main-loop-threaded)))
+(defun configure-threads ()
+  (if (threaded-p)
+      (setf *main-loop* #'main-loop-threaded)
+      (setf *main-loop* #'main-loop)))
 
 (eval-when (:load-toplevel :execute)
-  (maybe-configure-threaded))
+  (configure-threads))
 
 ;(untrace start acceptor-loop-threaded read write set-nonblocking socket:socket socket:bind socket:listen socket:accept unistd:close unistd:select)