On 5/17/07, Dan Muresan <[EMAIL PROTECTED]> wrote:
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/[email protected]/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.


That's right. I can't remember now, why the above code was commented
out, but I'll investigate.


cheers,
felix


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to