[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange Thread Behavior (bug?)

From: sig
Subject: Strange Thread Behavior (bug?)
Date: Fri, 25 Jul 2003 10:06:18 -0400
User-agent: Mutt/

I have run up the following strange behavior that I think might
be a bug. I make a file called test.scm which contains the
following text:

(use-modules (ice-9 threads))

(define f (open-input-file "test.scm"))

   (let loop ()
     (display "line 1.\n")
     (read-line f)
     (display "line 2.\n")
     (display "line 3.\n")
     (display "line 4.\n")))

When I run this code, it prints out:
line 1.
line 2.
line 3.

Umm, what happened to line 4? If I change remove the (read-line
f) part or, even more strangely, delete the word "loop" thereby
making the named let a regular old let, or if I put the line
(yield) at the very after everything, I get:

line 1.
line 2.
line 3.
line 4.

Which is what I should get. Can anyone shead some light as to
what is going on here? I've tried this on multiple machines and
multiple versions (1.6.0, and a stable nightly from 2 weeks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]