diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-17 09:11:21 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-17 09:11:21 +0100 |
commit | 8415837c306f80916485168f56c555b6c6d7cf86 (patch) | |
tree | 3c7339346840553759560e735fbee21c70bef3f1 /guix-build-coordinator/utils.scm | |
parent | 7f6db4b55411f79ab5f2639318dc5871c1452f00 (diff) | |
download | build-coordinator-8415837c306f80916485168f56c555b6c6d7cf86.tar build-coordinator-8415837c306f80916485168f56c555b6c6d7cf86.tar.gz |
Remove the GC protection mechanism
Hopefully this is unused now.
Diffstat (limited to 'guix-build-coordinator/utils.scm')
-rw-r--r-- | guix-build-coordinator/utils.scm | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 0aaba2e..e16b41a 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -49,9 +49,6 @@ make-base64-output-port - use-gc-protection? - with-gc-protection - with-port-timeouts set-store-connection-timeout @@ -300,17 +297,6 @@ upcoming chunk." (parse-query-string query)) '()))) -(define use-gc-protection? - (make-parameter #t)) - -(define (with-gc-protection thunk) - (if (use-gc-protection?) - (dynamic-wind - gc-disable - thunk - gc-enable) - (thunk))) - (define &port-timeout (make-exception-type '&port-timeout &external-error @@ -355,12 +341,10 @@ upcoming chunk." (unless (string-null? s) (let* ((bv (string->bytevector s "ISO-8859-1")) (length (bytevector-length bv))) - (with-gc-protection - (lambda () - (put-string port (number->string length 16)) - (put-string port "\r\n") - (put-bytevector port bv) - (put-string port "\r\n"))) + (put-string port (number->string length 16)) + (put-string port "\r\n") + (put-bytevector port bv) + (put-string port "\r\n") (when report-bytes-sent (report-bytes-sent length)) @@ -380,12 +364,10 @@ upcoming chunk." (define (flush) #t) (define (close) - (with-gc-protection - (lambda () - (put-string port "0\r\n\r\n") - (force-output port) - (unless keep-alive? - (close-port port))))) + (put-string port "0\r\n\r\n") + (force-output port) + (unless keep-alive? + (close-port port))) (let ((ret (make-soft-port (vector %put-char %put-string flush #f close) "w"))) (setvbuf ret 'block buffering) @@ -429,13 +411,11 @@ upcoming chunk." (callback chunked-output-port) (close-port chunked-output-port) - (with-gc-protection - (lambda () - (let ((response (read-response port))) - (let ((body (read-response-body response))) - (close-port port) - (values response - body))))))))))))) + (let ((response (read-response port))) + (let ((body (read-response-body response))) + (close-port port) + (values response + body))))))))))) (define (find-missing-substitutes-for-output store substitute-urls output) (if (valid-path? store output) |