comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Synchronizer.d @ 51:c01d033c633a

[swt lin]
author Frank Benoit <benoit@tionex.de>
date Fri, 27 Mar 2009 19:58:06 +0100
parents 7a2dd761a8b2
children fb3aa8075988
comparison
equal deleted inserted replaced
50:d5075f5226e5 51:c01d033c633a
19 19
20 import org.eclipse.swt.SWT; 20 import org.eclipse.swt.SWT;
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 } 26 }
27 27
28 /** 28 /**
29 * Instances of this class provide synchronization support 29 * Instances of this class provide synchronization support
183 if (runnable !is null) runnable.run (); 183 if (runnable !is null) runnable.run ();
184 return; 184 return;
185 } 185 }
186 synchronized (lock) { 186 synchronized (lock) {
187 bool interrupted = false; 187 bool interrupted = false;
188 while (!lock.done ()) { 188 version(Tango){
189 try { 189 while (!lock.done ()) {
190 lock.wait (); 190 try {
191 } catch (SyncException e) { 191 lock.wait ();
192 interrupted = true; 192 } catch (SyncException e) {
193 interrupted = true;
194 }
193 } 195 }
196 } else { // Phobos
197 implMissing( __FILE__, __LINE__);
194 } 198 }
195 if (interrupted) { 199 if (interrupted) {
196 Compatibility.interrupt(); 200 Compatibility.interrupt();
197 } 201 }
198 if (lock.throwable !is null) { 202 if (lock.throwable !is null) {