mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
don't start thread checking for leap seconds if env var is unspecified
This commit is contained in:
parent
ec345fe370
commit
479efcdc33
1 changed files with 13 additions and 11 deletions
|
@ -154,16 +154,18 @@
|
|||
(lambda ()
|
||||
(let ((port (open-port)))
|
||||
(when port
|
||||
(set-cache! (make-cache-from-port port)))))))
|
||||
(set-cache! (make-cache-from-port port))
|
||||
(close-input-port port))))))
|
||||
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(let loop ()
|
||||
(thread-sleep! *cache-lifetime*)
|
||||
(update-cache! (open-leap-seconds-list-port))
|
||||
(loop)))
|
||||
"leap-second-update-poll"))
|
||||
(when (get-environment-variable *file-name-environment-variable*)
|
||||
(thread-start!
|
||||
(make-thread
|
||||
(lambda ()
|
||||
(let loop ()
|
||||
(thread-sleep! *cache-lifetime*)
|
||||
(update-cache! (open-leap-seconds-list-port))
|
||||
(loop)))
|
||||
"leap-second-update-poll")))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
@ -242,8 +244,8 @@
|
|||
(let ((file-name
|
||||
(get-environment-variable *file-name-environment-variable*)))
|
||||
(if file-name
|
||||
(open-input-file file-name)
|
||||
#f))))))
|
||||
(open-input-file file-name)
|
||||
#f))))))
|
||||
|
||||
(define (open-leap-seconds-list-port)
|
||||
(atomic-box-value *open-leap-seconds-list-port*))
|
||||
|
|
Loading…
Add table
Reference in a new issue