[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reentrant port table stuff
From: |
Marius Vollmer |
Subject: |
Re: reentrant port table stuff |
Date: |
27 Aug 2001 00:38:37 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102 |
Chris Cramer <address@hidden> 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?