X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.utils.thread%2Fsrc%2Forg%2Fsimantics%2Futils%2Fthreads%2Fua%2FWorker.java;h=fa0fe02ebf5bc616f3786a39698e863f62dc7854;hb=a9e5abf29200550168557ae2c7e0a6e2442f6c2b;hp=1fc3667c8d997a82e44ea360047cfc198561356e;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/ua/Worker.java b/bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/ua/Worker.java index 1fc3667c8..fa0fe02eb 100644 --- a/bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/ua/Worker.java +++ b/bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/ua/Worker.java @@ -1,46 +1,46 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.utils.threads.ua; - -import java.util.Collection; - -/** - * Worker executes tasks. - *
- * Hint! To execute work synchronously use:
- * Worker.asyncExec(runnable, null).waitForState(WorkState.FINAL_STATES);
- *
- * To cancel all work get the work with getQueuedWork() and invoke cancel() to each.
- *
- * @see SynchronizedWorker
- * @see ThreadPool
- * @author Toni Kalajainen (toni.kalajainen@vtt.fi)
- */
-public interface Worker extends StatefulExecutor {
-
- /**
- * Execute work (async).
- *
- * @param runnable
- * @param initialListener listener initially set on monitor object or null
- * @return async work monitor object
- */
- WorkMonitor asyncExec(Runnable runnable, StateListener
+ * Hint! To execute work synchronously use:
+ * To cancel all work get the work with getQueuedWork() and invoke cancel() to each.
+ *
+ * @see SynchronizedWorker
+ * @see ThreadPool
+ * @author Toni Kalajainen (toni.kalajainen@vtt.fi)
+ */
+public interface Worker extends StatefulExecutor {
+
+ /**
+ * Execute work (async).
+ *
+ * @param runnable
+ * @param initialListener listener initially set on monitor object or null
+ * @return async work monitor object
+ */
+ WorkMonitor asyncExec(Runnable runnable, StateListener
+ * Worker.asyncExec(runnable, null).waitForState(WorkState.FINAL_STATES);
+ *