Mercurial > projects > dwt-addons
diff dwtx/jface/viewers/deferred/BackgroundContentProvider.d @ 167:862b05e0334a
Add a wrapper for Thread
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 09 Sep 2008 15:59:16 +0200 |
parents | ea8ff534f622 |
children | c3583c6ec027 |
line wrap: on
line diff
--- a/dwtx/jface/viewers/deferred/BackgroundContentProvider.d Mon Sep 08 01:01:30 2008 +0200 +++ b/dwtx/jface/viewers/deferred/BackgroundContentProvider.d Tue Sep 09 15:59:16 2008 +0200 @@ -29,7 +29,7 @@ import dwtx.jface.viewers.IFilter; import dwt.dwthelper.utils; -import tango.core.Thread; +import dwtx.dwtxhelper.JThread; /** * Contains the algorithm for performing background sorting and filtering in a virtual @@ -141,7 +141,7 @@ private ConcurrentTableUpdator updator; private IProgressMonitor sortingProgressMonitor; - private Thread sortThread = null; + private JThread sortThread = null; private /+volatile+/ FastProgressReporter sortMon; @@ -475,12 +475,12 @@ */ private bool sortScheduled = false; - private final class SortThread : Thread { + private final class SortThread : JThread { private this(String name) { - super(/+name+/); + super(name); } - public /+override+/ void run() { + public override void run() { loop: while (true) { synchronized (lock) { sortScheduled = false; @@ -514,8 +514,8 @@ if (!sortThreadStarted) { sortThreadStarted = true; sortThread = new SortThread(SORTING); - sortThread.isDaemon = true; - sortThread.priority = sortThread.priority - 1; + sortThread.setDaemon( true ); + sortThread.setPriority( sortThread.getPriority() - 1 ); sortThread.start(); } }