in reply to Re: Re: Non-blocking pings on Win32
in thread Non-blocking pings on Win32

I'd agree with those changes -- I've done pretty much exactly the same when shoe-horning it into one of my scripts.

I hadn't thought of putting a threads->yield in there, and I guess that makes the code a bit more friendly -- it doesn't appear to impact performance at all so I've added that too.

One other thing I've done is to check how many machines are to be pinged, and dropped the number of threads if it's a small number (i.e. no point spawning 20 threads to ping five machines)

  • Comment on Re: Re: Re: Non-blocking pings on Win32