comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Synchronizer.d @ 113:fb3aa8075988

D2 support for the linux port.
author Jacob Carlborg <doob@me.com>
date Wed, 06 Apr 2011 21:57:23 +0200
parents c01d033c633a
children
comparison
equal deleted inserted replaced
112:9f4c18c268b2 113:fb3aa8075988
21 import java.lang.Thread; 21 import java.lang.Thread;
22 import org.eclipse.swt.graphics.Device; 22 import org.eclipse.swt.graphics.Device;
23 version(Tango){ 23 version(Tango){
24 import tango.core.Exception; 24 import tango.core.Exception;
25 } else { // Phobos 25 } else { // Phobos
26 import core.sync.exception: SyncException;
26 } 27 }
27 28
28 /** 29 /**
29 * Instances of this class provide synchronization support 30 * Instances of this class provide synchronization support
30 * for displays. A default instance is created automatically 31 * for displays. A default instance is created automatically
183 if (runnable !is null) runnable.run (); 184 if (runnable !is null) runnable.run ();
184 return; 185 return;
185 } 186 }
186 synchronized (lock) { 187 synchronized (lock) {
187 bool interrupted = false; 188 bool interrupted = false;
188 version(Tango){ 189 while (!lock.done ()) {
189 while (!lock.done ()) { 190 try {
190 try { 191 lock.wait ();
191 lock.wait (); 192 } catch (SyncException e) {
192 } catch (SyncException e) { 193 interrupted = true;
193 interrupted = true;
194 }
195 } 194 }
196 } else { // Phobos
197 implMissing( __FILE__, __LINE__);
198 } 195 }
199 if (interrupted) { 196 if (interrupted) {
200 Compatibility.interrupt(); 197 Compatibility.interrupt();
201 } 198 }
202 if (lock.throwable !is null) { 199 if (lock.throwable !is null) {