Chris Cramer <[EMAIL PROTECTED]> writes:

> I'm using the stable CVS branch of Guile. This program eventually
> segfaults, because open-output-file and close-port (and open-file, etc)
> are not reentrant:
> 
> (use-modules (ice-9 threads))
> 
> (define (child port)
>     (display "Hello" port)
>     (newline port))
> 
> (define (create-child)
>     (begin-thread
>         (let ((port (open-output-file "/dev/null")))
>         (child port)
>         (close-port port))))
> 
> (define (test-threads . ignored)
>         (let loop ((i 0))
>             (create-child)
>             (display i) (newline)
>             (loop (+ i 1))))

I can not get this to crash.  It just runs, but gets _very_ slow after
about 900000 iterations.  I don't know why yet.

What did you do exactly?  How did you configure your guile?

_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile

Reply via email to