From: Daniel Berger Date: 2008-03-16T06:32:12+09:00 Subject: Re: How to make net-ping thread safe? On Mar 15, 11:28 am, Laurent Julliard wrote: > Hi, > > I'm using the excellent net-ping gem (v 1.2.2 on Ruby 1.8.6 Linux box) > from Daniel Berger to ping a number of machines on a local area network. > > I recently refactored my code to use threads and I'm having troubles > with Net::Ping::ICMP. I'm trying to ping several machines, each one in a > separate thread and I'm seing strange things like when one machine is on > all three machines are reported on (although two are off). When I run my > program with one thread only the on/off state shows as expected. > > So I'm wondering if the Net::Ping::ICMP#ping method is thread safe? Hi Laurent, Please apply Joel's patches and let me know how it works. If all is well I'll apply the patches and put out another release. BTW, thanks Joel! Regards, Dan