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 ()
|
(lambda ()
|
||||||
(let ((port (open-port)))
|
(let ((port (open-port)))
|
||||||
(when port
|
(when port
|
||||||
(set-cache! (make-cache-from-port port)))))))
|
(set-cache! (make-cache-from-port port))
|
||||||
|
(close-input-port port))))))
|
||||||
|
|
||||||
(thread-start!
|
(when (get-environment-variable *file-name-environment-variable*)
|
||||||
(make-thread
|
(thread-start!
|
||||||
(lambda ()
|
(make-thread
|
||||||
(let loop ()
|
(lambda ()
|
||||||
(thread-sleep! *cache-lifetime*)
|
(let loop ()
|
||||||
(update-cache! (open-leap-seconds-list-port))
|
(thread-sleep! *cache-lifetime*)
|
||||||
(loop)))
|
(update-cache! (open-leap-seconds-list-port))
|
||||||
"leap-second-update-poll"))
|
(loop)))
|
||||||
|
"leap-second-update-poll")))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
@ -242,8 +244,8 @@
|
||||||
(let ((file-name
|
(let ((file-name
|
||||||
(get-environment-variable *file-name-environment-variable*)))
|
(get-environment-variable *file-name-environment-variable*)))
|
||||||
(if file-name
|
(if file-name
|
||||||
(open-input-file file-name)
|
(open-input-file file-name)
|
||||||
#f))))))
|
#f))))))
|
||||||
|
|
||||||
(define (open-leap-seconds-list-port)
|
(define (open-leap-seconds-list-port)
|
||||||
(atomic-box-value *open-leap-seconds-list-port*))
|
(atomic-box-value *open-leap-seconds-list-port*))
|
||||||
|
|
Loading…
Add table
Reference in a new issue