Avoid choice-operation for the gc watcher
In case this causes a memory leak.
This commit is contained in:
parent
42ac51212f
commit
8dcc89df50
1 changed files with 6 additions and 10 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 threads)
|
||||
#:use-module (ice-9 format)
|
||||
#:use-module (ice-9 atomic)
|
||||
#:use-module (ice-9 exceptions)
|
||||
#:use-module (ice-9 textual-ports)
|
||||
#:use-module (ice-9 hash-table)
|
||||
|
|
@ -3456,8 +3457,8 @@ SKIP LOCKED")
|
|||
ignore-targets
|
||||
inferior-memory-limit
|
||||
parallelism)
|
||||
(define finished-channel
|
||||
(make-channel))
|
||||
(define finished?
|
||||
(make-atomic-box #f))
|
||||
|
||||
(define job-not-found-exception
|
||||
(make-exception-with-message
|
||||
|
|
@ -3504,13 +3505,8 @@ SKIP LOCKED")
|
|||
(/ (assq-ref stats 'heap-free-size)
|
||||
(expt 2. 20)))))
|
||||
|
||||
(when
|
||||
(perform-operation
|
||||
(choice-operation
|
||||
(wrap-operation (get-operation finished-channel)
|
||||
(const #f))
|
||||
(wrap-operation (sleep-operation 3)
|
||||
(const #t))))
|
||||
(unless (atomic-box-ref finished?)
|
||||
(sleep 3)
|
||||
(loop gc-times
|
||||
gc-time-taken))))))
|
||||
|
||||
|
|
@ -3652,5 +3648,5 @@ WHERE revision_id = $1"
|
|||
"update-derivation-outputs-statistics"
|
||||
(update-derivation-outputs-statistics conn))))))
|
||||
|
||||
(put-message finished-channel #t)
|
||||
(atomic-box-set! finished? #t)
|
||||
result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue