[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] strange behavior - any reason?
From: |
Felix Winkelmann |
Subject: |
Re: [Chicken-users] strange behavior - any reason? |
Date: |
Tue, 17 Dec 2002 09:30:03 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530 |
Joerg F. Wittenberger wrote:
From the chicken source I'd expect this loop to terminate soon. But
this loops endlessly.
(else (values "uncaught exception" (format #f "N ~a: >>~s<<" n reason)
'() '())))))
((join-timeout-exception? ex)
(values "time out" "join-timeout-exception") '() '())
^ (intended?)
(else (values "unknown exception" (format #f "~s" ex) '() '()))))
So how do I find out where this uncaught exception comes from?
As to the threading question: when the code runs into the above
endless loop, the system load is almost zero on my single processor
machine. This loop eats about 2.5% processor time and that's it.
(Only if I print the value of 'n' in every loop, I get a reasonable
load.) So what does the executable do instead of processing my stupid
endless loop? Does chicken have some smart optimization to conserve
cpu load for usless operations? ;-)
Not that I'm aware of (:-).
When you call `thread-join!' to wait for a thread, *every* exception
(unless otherwise handled) will result in an uncaught-exception.
So it is not unlikely, that a simple bug can trigger endless looping.
On the other hand it's not unlikely that there is a bug in the
threading/exception system, since I assume you are heavily stressing
it.
Can you supply some sample code that triggers this behaviour?
cheers,
felix