From: Roger Pack Date: 2008-09-25T06:14:20+09:00 Subject: Re: Threads, do_nanosleep and battery life > Hi all, > > Can you share some more details on how exactly it was addressed? I > have a multi-threaded Ruby daemon that has nothing to do with Gtk, and > it exhibits the same behaviour: 100 calls to do_nanosleep per second. > The deamon is a DRb based object cache, the whole source is these two > files, 191 lines total: > > http://cvs.savannah.gnu.org/viewvc/*checkout*/samizdat/samizdat/lib/samizdat/cache.rb?revision=1.99 > http://cvs.savannah.gnu.org/viewvc/*checkout*/samizdat/samizdat/bin/samizdat-drb-server?revision=1.99 > > This definitely looks like a generic Ruby issue to me, but if there is > a workaround, I don't mind applying it on the application level. > > [ sorry for waking up this really old thread, but Google tells me that > is the only case where Ruby do_nanosleep issue was addressed ] http://groups.google.com/group/never-block/browse_thread/thread/b806a8443ffb5f45?hl=en explains a little on how Ruby does threading. GL! -=R -- Posted via http://www.ruby-forum.com/.