Hi, Phil --

Most of that didn't look like Java...  Nonetheless, my initial thought
would be that this fragment:

                        Thread.sleep(10);

Is essentially a spin-lock, and that's the culprit in your CPU spike.
Sleeping a thread for 10ms is going to have almost no effect (10ms is
smaller than the clock granularity on Windows, for example), so that
look is going to get executed LOTS of times.  How about sleeping for
100ms and trying again?

-- Paul

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to