From 07f58520dadec563eace4b9ea954009c718b5805 Mon Sep 17 00:00:00 2001 From: haskal Date: Wed, 9 Sep 2020 14:55:09 -0400 Subject: [PATCH] basic fixes --- NOTES.md | 6 ++++++ private/rules.rkt | 2 +- private/taskq.rkt | 8 ++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/NOTES.md b/NOTES.md index b711675..7b009ec 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,6 @@ +support tor and opennic sites +reject brave browser + ## deps - crypto-lib @@ -116,6 +119,9 @@ todo eventually this should support mathjax and highlighted code and stuff mathjax should be rendered as the mozilla native math thing with a javascript polyfill for gogle chrombe and others +rss/atom +gopher +gemini nginx caching - https://blog.theodo.com/2016/06/improve-the-performance-of-your-webapp-configure-nginx-to-cache/ diff --git a/private/rules.rkt b/private/rules.rkt index c533164..2b166bc 100644 --- a/private/rules.rkt +++ b/private/rules.rkt @@ -215,5 +215,5 @@ (define ops (generate-operations compiler-rules)) (for ([op (in-list ops)]) - (printf "executing ~s\n" op) + (printf "BUILD: ~a\n" (rule-output op)) (execute-rule op)) diff --git a/private/taskq.rkt b/private/taskq.rkt index 07755ae..c78d2f5 100644 --- a/private/taskq.rkt +++ b/private/taskq.rkt @@ -57,6 +57,10 @@ ;; workers that are waiting for work (define dequeue-waiters (mutable-set)) + ;; create an exn:fail but don't raise it + (define (make-error str) + (exn:fail (format "error: ~a" str) (current-continuation-marks))) + ;; adds a waiter for a task with given id (define (add-task-waiter! id from) (hash-update! task-waiters id (lambda (s) (set-add s from)) set)) @@ -96,7 +100,7 @@ (thread-send w #f #f)) (for ([(k v) (in-hash task-waiters)]) (for ([w (in-set v)]) - (thread-send w (error "queue shutdown") #f)))) + (thread-send w (make-error "queue shutdown") #f)))) ;; attempts to dequeue the next work ;; if there is work, set it to executing and invoke and remove one of the workers @@ -172,7 +176,7 @@ ['dequeue (dequeue from) (loop)] ['complete (complete from data) (loop)] ['resched (resched from data) (loop)] - [_ (thread-send from (error "unknown message") #f) (loop)])])) + [_ (thread-send from (make-error "unknown message") #f) (loop)])])) ;; disconnect and exit (disconnect c)