]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/CurrentThread.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.utils.thread / src / org / simantics / utils / threads / CurrentThread.java
index 36f54349c5b6dd09bd86dc1b1da4e78a6c10ff65..54ec96e2ef20bb7bd496d43f7b823028ef34c26a 100644 (file)
@@ -1,68 +1,68 @@
-/*******************************************************************************\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
-/*\r
- *\r
- * @author Toni Kalajainen\r
- */\r
-package org.simantics.utils.threads;\r
-\r
-import java.util.concurrent.Executor;\r
-\r
-\r
-/**\r
- * No thread switching\r
- * \r
- * @Todo Rename to InvokerWorks\r
- */\r
-public class CurrentThread implements IThreadWorkQueue, Executor {\r
-\r
-       static CurrentThread INSTANCE = new CurrentThread();\r
-       \r
-       public static IThreadWorkQueue getThreadAccess()\r
-       {\r
-               return INSTANCE;\r
-       }\r
-       \r
-       CurrentThread() {}\r
-       \r
-       @Override\r
-       public Thread asyncExec(Runnable runnable) {\r
-               runnable.run();\r
-               return Thread.currentThread();\r
-       }\r
-\r
-       @Override\r
-       public boolean syncExec(Runnable runnable) {\r
-               runnable.run();\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public boolean currentThreadAccess() {\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public Thread getThread() {\r
-               return Thread.currentThread();\r
-       }\r
-       \r
-       @Override\r
-       public String toString() {\r
-               return "Current thread";\r
-       }\r
-\r
-       @Override\r
-       public void execute(Runnable command) {\r
-               command.run();\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
+ *******************************************************************************/
+/*
+ *
+ * @author Toni Kalajainen
+ */
+package org.simantics.utils.threads;
+
+import java.util.concurrent.Executor;
+
+
+/**
+ * No thread switching
+ * 
+ * @Todo Rename to InvokerWorks
+ */
+public class CurrentThread implements IThreadWorkQueue, Executor {
+
+       static CurrentThread INSTANCE = new CurrentThread();
+       
+       public static IThreadWorkQueue getThreadAccess()
+       {
+               return INSTANCE;
+       }
+       
+       CurrentThread() {}
+       
+       @Override
+       public Thread asyncExec(Runnable runnable) {
+               runnable.run();
+               return Thread.currentThread();
+       }
+
+       @Override
+       public boolean syncExec(Runnable runnable) {
+               runnable.run();
+               return true;
+       }
+
+       @Override
+       public boolean currentThreadAccess() {
+               return true;
+       }
+
+       @Override
+       public Thread getThread() {
+               return Thread.currentThread();
+       }
+       
+       @Override
+       public String toString() {
+               return "Current thread";
+       }
+
+       @Override
+       public void execute(Runnable command) {
+               command.run();
+       }
+}