]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/IThreadWorkQueue.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.utils.thread / src / org / simantics / utils / threads / IThreadWorkQueue.java
index a7114f9442e81598ef473c58796dead445a11bdf..b18e9a555893d404705cb1e113ca4495df13f278 100644 (file)
@@ -1,67 +1,67 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.utils.threads;\r
-\r
-/**\r
- * IThreadAccess is an interface for thread context switching.\r
- * \r
- * TODO Yield that makes the thread do other tasks in queue\r
- * \r
- * @Todo Queue open method + QueueClosed exception\r
- * @see SWTThread\r
- * @see AWTThread\r
- * @see CurrentThread\r
- * @author Toni Kalajainen\r
- */\r
-public interface IThreadWorkQueue {\r
-\r
-       /**\r
-        * Execute runnable asynchronously.\r
-        * <p>\r
-        * Note!\r
-        * Do not call this method directly unless the instance has been wrapped with \r
-        * ThreadUtils.getBetterThreadAccess(), if not use ThreadUtils.asyncExec.\r
-        * \r
-        * \r
-        * @param runnable\r
-        * @return the thread that is processing the runnable or null if thread refused to accept event\r
-        */\r
-       Thread asyncExec(Runnable runnable);\r
-       \r
-       /**\r
-        * Execute runnable synchronously. \r
-        * This invocation will block until runnable has been executed.\r
-        * Note!\r
-        * Do not call this method directly unless the instance has been wrapped with \r
-        * ThreadUtils.getBetterThreadAccess(), if not use ThreadUtils.syncExec.\r
-        * \r
-        * @param runnable\r
-        * @return true if thread accepted the event, false if not\r
-        */\r
-       boolean syncExec(Runnable runnable);\r
-       \r
-       /**\r
-        * Is the current thread the same as this access\r
-        * @return <code>true</code> if current thread is the same as this queue uses\r
-        */\r
-       boolean currentThreadAccess();\r
-       \r
-       /**\r
-        * Get the thread. May return null if the thread has not been initialized.\r
-        * The returned thread may also change right after call if no runnables are\r
-        * in queue.\r
-        * \r
-        * @return thread or null\r
-        */\r
-       Thread getThread();\r
-\r
-}\r
+/*******************************************************************************
+ * 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;
+
+/**
+ * IThreadAccess is an interface for thread context switching.
+ * 
+ * TODO Yield that makes the thread do other tasks in queue
+ * 
+ * @Todo Queue open method + QueueClosed exception
+ * @see SWTThread
+ * @see AWTThread
+ * @see CurrentThread
+ * @author Toni Kalajainen
+ */
+public interface IThreadWorkQueue {
+
+       /**
+        * Execute runnable asynchronously.
+        * <p>
+        * Note!
+        * Do not call this method directly unless the instance has been wrapped with 
+        * ThreadUtils.getBetterThreadAccess(), if not use ThreadUtils.asyncExec.
+        * 
+        * 
+        * @param runnable
+        * @return the thread that is processing the runnable or null if thread refused to accept event
+        */
+       Thread asyncExec(Runnable runnable);
+       
+       /**
+        * Execute runnable synchronously. 
+        * This invocation will block until runnable has been executed.
+        * Note!
+        * Do not call this method directly unless the instance has been wrapped with 
+        * ThreadUtils.getBetterThreadAccess(), if not use ThreadUtils.syncExec.
+        * 
+        * @param runnable
+        * @return true if thread accepted the event, false if not
+        */
+       boolean syncExec(Runnable runnable);
+       
+       /**
+        * Is the current thread the same as this access
+        * @return <code>true</code> if current thread is the same as this queue uses
+        */
+       boolean currentThreadAccess();
+       
+       /**
+        * Get the thread. May return null if the thread has not been initialized.
+        * The returned thread may also change right after call if no runnables are
+        * in queue.
+        * 
+        * @return thread or null
+        */
+       Thread getThread();
+
+}