From 73c8f77eda23fa474ac0a9f9814149fe0752f31c Mon Sep 17 00:00:00 2001 From: Chris Double Date: Wed, 28 Jul 2004 01:53:55 +0000 Subject: [PATCH] Add code to run http in a thread, catching errors and restarting. --- contrib/cont-responder/load.factor | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/cont-responder/load.factor b/contrib/cont-responder/load.factor index f06fb82c26..8d52df169c 100644 --- a/contrib/cont-responder/load.factor +++ b/contrib/cont-responder/load.factor @@ -26,6 +26,11 @@ USE: httpd-responder USE: httpd USE: threads +USE: stack +USE: prettyprint +USE: combinators +USE: errors +USE: stdio default-responders USE: parser @@ -37,5 +42,7 @@ USE: parser : l5 "todo.factor" run-file ; : l6 "todo-example.factor" run-file ; : l7 "eval-responder.factor" run-file ; -: l8 8888 httpd ; -: l9 [ 8888 httpd ] in-thread ; +: l8 "live-updater-responder.factor" run-file ; +: la ; +: la [ 8888 httpd ] [ dup . flush [ la ] when* ] catch ; +: lb [ la "httpd thread exited.\n" write flush ] in-thread ;