comparison dwt/widgets/RunnableLock.d @ 15:2952d5604c0a

Ported some widgets, added some stuff to the runtime bindings
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 29 Aug 2008 21:46:05 +0200
parents 380af2bdd8e5
children 5b53d338c709
comparison
equal deleted inserted replaced
14:762fbe6f17d3 15:2952d5604c0a
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 *
11 * Port to the D programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
10 *******************************************************************************/ 13 *******************************************************************************/
11 module dwt.widgets.RunnableLock; 14 module dwt.widgets.RunnableLock;
12 15
16 import tango.core.Thread;
17
18 import dwt.dwthelper.Runnable;
13 import dwt.dwthelper.utils; 19 import dwt.dwthelper.utils;
14 20
15 21
16 /** 22 /**
17 * Instances of this class are used to ensure that an 23 * Instances of this class are used to ensure that an
23 class RunnableLock { 29 class RunnableLock {
24 Runnable runnable; 30 Runnable runnable;
25 Thread thread; 31 Thread thread;
26 Throwable throwable; 32 Throwable throwable;
27 33
28 RunnableLock (Runnable runnable) { 34 this (Runnable runnable) {
29 this.runnable = runnable; 35 this.runnable = runnable;
30 } 36 }
31 37
32 bool done () { 38 bool done () {
33 return runnable is null || throwable !is null; 39 return runnable is null || throwable !is null;