Mercurial > projects > dwt2
comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130a.d @ 109:8ae65ae167f5
Updated swt win32 for DMD 1.063 and latest Tango trunk.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Wed, 15 Sep 2010 16:42:28 +0200 |
parents | 4e5843b771cc |
children | 9f4c18c268b2 |
comparison
equal
deleted
inserted
replaced
108:b397a43d66d1 | 109:8ae65ae167f5 |
---|---|
31 | 31 |
32 import org.eclipse.swt.custom.BusyIndicator; | 32 import org.eclipse.swt.custom.BusyIndicator; |
33 | 33 |
34 import java.lang.all; | 34 import java.lang.all; |
35 | 35 |
36 import tango.core.Thread; | 36 //import tango.core.Thread; |
37 import tango.io.Stdout; | 37 import tango.io.Stdout; |
38 import tango.util.Convert; | 38 import tango.util.Convert; |
39 import tango.util.log.Trace; | 39 import tango.util.log.Trace; |
40 | 40 |
41 | 41 |
65 id = nextId[0]++; | 65 id = nextId[0]++; |
66 display.syncExec( dgRunnable( &printStart, text, id )); | 66 display.syncExec( dgRunnable( &printStart, text, id )); |
67 for (int i = 0; i < 6; i++) { | 67 for (int i = 0; i < 6; i++) { |
68 if (display.isDisposed()) return; | 68 if (display.isDisposed()) return; |
69 Trace.formatln("do task that takes a long time in a separate thread {} {}/6", id, i); | 69 Trace.formatln("do task that takes a long time in a separate thread {} {}/6", id, i); |
70 Thread.sleep(0.500); | 70 Thread.sleep(500); |
71 } | 71 } |
72 /* | 72 /* |
73 for (int i = 0; i < 100000; i++) { | 73 for (int i = 0; i < 100000; i++) { |
74 if (display.isDisposed()) return; | 74 if (display.isDisposed()) return; |
75 Stdout.formatln("do task that takes a long time in a separate thread {}", id); | 75 Stdout.formatln("do task that takes a long time in a separate thread {}", id); |