On Tue, Oct 20, 2009 at 12:07 AM, Alex Osborne <a...@meshy.org> wrote:

> Gorsal wrote:
> > However, this raises the CPU to about 50 percent. This is due to the
> > infinite recursion, I'm assuming?
>
> Yes, it's because you're tight looping, checking to see if data is
> available as fast as possible.  A quick and dirty hack would be to put
> in a sleep to slow it down a bit.


A blocking operation and Java's Thread.interrupt() method would be cleaner.

Gorsal: dual-core machine?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to