bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #28757] [NSThread sleepUntilDate:] in this example uses 100% of a C


From: Richard Frith-Macdonald
Subject: [bug #28757] [NSThread sleepUntilDate:] in this example uses 100% of a CPU while sleeping on MinGW
Date: Wed, 03 Feb 2010 09:47:06 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10

Update of bug #28757 (project gnustep):

                  Status:            Works For Me => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #3:

Found this ...
If the configure script detects the usleep() function, the code uses that
(because it has microsecond granularity) rather than the Sleep() function
(millisecond granularity).
Unfortunately, on windows usleep() performs a busy wait using the cpu.
I fixed this by changing the code so that, on windows, it  always uses
Sleep() except for small intervals (under 0.1 sec) where we might reasonably
need higher accuracy. 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28757>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]