Importing an error containing library in library causes dead lock on multithread environment

Create issue
Issue #159 resolved
Takashi Kato repo owner created an issue

This should not prevent other thread's process

;; bar.sls
(library (bar)
    (expor bar) ;; oops
    (import (rnrs))
  (define bar 'bar))

;; test.scm
(import (rnrs)
        (srfi :18))

(define error-thread
  (make-thread
   (lambda ()
     (guard (e (else (report-error e)))
       (eval '(library (foo)
                  (export bar)
                  (import (rnrs) (bar)))
             (environment '(sagittarius))))
     (thread-sleep! 100))))

(define ok-thread
  (make-thread
   (lambda ()
     (guard (e (else e))
       (eval '(import (foo)) (environment '(sagittarius)))))))

(thread-start! error-thread)
(thread-join! (thread-start! ok-thread))
(print 'done)

Comments (1)

  1. Log in to comment