thanks for your reply.
however, as i pointed out in my initial post, the problem only occurs
on windows. I searched for the problem for quite a while and it seems
that ruby uses Winsock on Windows (instead of Winsock2). Somehow ruby's
scheduler seems not to be able to schedule other threads during a
TCPSocket connection attempt. I think this is not a ruby problem in
general, but has todo with ruby + winsock.
Maybe there are any patches around?