[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] busy-wait in tcp-connect
From: |
Dan Muresan |
Subject: |
[Chicken-users] busy-wait in tcp-connect |
Date: |
Thu, 17 May 2007 20:51:19 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1 |
Hi,
I've noticed that calling tcp-connect when a single Chicken thread
exists maxes out the CPU. Try (tcp-connect "1.2.3.4" 80).
In tcp.scm, I see that a thread-block-for-i/o! was commented out:
;; line 543
(let loop ()
(let ((f (##net#select-write s)))
(when (eq? f -1) (fail))
(unless (eq? f 1)
;(##sys#thread-block-for-i/o! ##sys#current-thread s #t)
(yield)
(loop) ) ) )
I assume that thread-block-for-i/o somehow failed to wake-up in certain
circumstances, so uncommenting that statement would not be workable?
See also http://www.mail-archive.com/address@hidden/msg03122.html
That message suggests that when connecting to a filtered port (or, in my
case, a non-existent host) not only will the CPU max out, but the call
will never time out. This is not good.
Best,
Dan
- [Chicken-users] busy-wait in tcp-connect,
Dan Muresan <=
- Re: [Chicken-users] busy-wait in tcp-connect, felix winkelmann, 2007/05/21
- Re: [Chicken-users] busy-wait in tcp-connect, Dan Muresan, 2007/05/21
- Re: [Chicken-users] busy-wait in tcp-connect, felix winkelmann, 2007/05/22
- Re: [Chicken-users] busy-wait in tcp-connect, Dan Muresan, 2007/05/22
- Re: [Chicken-users] busy-wait in tcp-connect, felix winkelmann, 2007/05/23
- Re: [Chicken-users] busy-wait in tcp-connect, felix winkelmann, 2007/05/23
- Re: [Chicken-users] busy-wait in tcp-connect, Kon Lovett, 2007/05/23
- [Chicken-users] stream API (was busy-wait in tcp-connect), Dan Muresan, 2007/05/23
- [Chicken-users] Re: stream API (was busy-wait in tcp-connect), Kon Lovett, 2007/05/23
- [Chicken-users] Re: stream API (was busy-wait in tcp-connect), Dan Muresan, 2007/05/23