PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Threads, do_nanosleep and battery life
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Threads, do_nanosleep and battery life

Réponse
 
LinkBack Outils de la discussion
Vieux 13/03/2008, 14h21   #1
Mark Somerville
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Threads, do_nanosleep and battery life

I'm writing a Ruby GTK application that runs on a mobile device (Nokia N800).
It's starting to take shape now, but I have noticed that leaving it running for
long periods of time is particularly bad for my battery life.

I don't really understand Ruby threads under the hood or what alterations to
them ruby-gtk2 makes (but am keen to learn!). Powertop suggests that Ruby is
waking up around 100 times a second when there is an active thread, even
during a sleep state. Presumably this is to check for thread activity.

Is there a way around this in Ruby 1.8? Will the new threading model in 1.9
this?

Any pointers are apprecited,

Mark

  Réponse avec citation
Vieux 15/03/2008, 02h06   #2
Kouhei Sutou
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Threads, do_nanosleep and battery life

Hi,

In <20080313132049.GA15954@titan.pccl.info>
"Threads, do_nanosleep and battery life" on Thu, 13 Mar 2008 22:21:58 +0900,
Mark Somerville <ms@pccl.info> wrote:

> I'm writing a Ruby GTK application that runs on a mobile device (Nokia N800).
> It's starting to take shape now, but I have noticed that leaving it running for
> long periods of time is particularly bad for my battery life.
>
> I don't really understand Ruby threads under the hood or what alterations to
> them ruby-gtk2 makes (but am keen to learn!). Powertop suggests that Ruby is
> waking up around 100 times a second when there is an active thread, even
> during a sleep state. Presumably this is to check for thread activity.


This should be fixed in Ruby-GNOME2 trunk.

Thanks,
--
kou

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h15.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08970 seconds with 10 queries