basic fixes

This commit is contained in:
xenia 2020-09-09 14:55:09 -04:00
parent 6051440074
commit 07f58520da
3 changed files with 13 additions and 3 deletions

View File

@ -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/

View File

@ -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))

View File

@ -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)