Skip to main content

Thread.sleep in NativeEventThread causes system clock speed-up

2 replies [Last post]
mcalmus
Offline
Joined: 2005-02-26

As a result of this bug in the JVM:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6435126

The call to Thread.sleep(1) in org.jdesktop.jdic.browser.internal.NativeEventThread causes the system clock on certain systems to noticeably speed up. I propose the following change (pardon the diff format):

// main event loop
while (true) {
try {
* Thread.sleep(1);
} catch (Exception e) {
}
----------
// main event loop
while (true) {
try {
* Thread.sleep(10);
} catch (Exception e) {
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
b_shamy
Offline
Joined: 2007-05-25

Hi,

I see similar problems in my application, which uses JDIC.
Where should I make these changes. Is this fixed in the latest version of JDIC 9.5.

Also, How can I get the JDIC patches. I see only release version.

Thanks
Shanmu

michael_shan
Offline
Joined: 2005-05-29

Thanks mcalmus! We've fixed it as your suggestion (refer issue 440).