diff options
author | Christopher Baines <mail@cbaines.net> | 2023-09-07 15:16:25 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-09-07 15:16:25 +0100 |
commit | 6f061356d52b614afa4337a33b248bcb071b0314 (patch) | |
tree | 136affa1f76f14b7c90734c53ca41b236cd888c3 | |
parent | afb6b8185d4142eaaa1fc46e0971155d71b324f9 (diff) | |
download | nar-herder-6f061356d52b614afa4337a33b248bcb071b0314.tar nar-herder-6f061356d52b614afa4337a33b248bcb071b0314.tar.gz |
Set thread names for worker threads
-rw-r--r-- | nar-herder/utils.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nar-herder/utils.scm b/nar-herder/utils.scm index 292d308..68d218d 100644 --- a/nar-herder/utils.scm +++ b/nar-herder/utils.scm @@ -436,9 +436,17 @@ falling back to en_US.utf8\n" (let ((channel (make-channel))) (for-each - (lambda _ + (lambda (thread-index) (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name + (string-append + name " w t " + (number->string thread-index)))) + (const #t)) + (let init ((args (initializer/safe))) (parameterize ((param args)) (let loop ((current-lifetime lifetime)) |