Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1d9269c9e236720e58bc19a99d048f9ca76a2dcc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*******************************************************************************
 * Copyright (c) 2011 Wind River Systems, Inc. and others. 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:
 * Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tm.te.core.concurrent.interfaces;

import java.util.concurrent.Executor;

/**
 * Single threaded execution service interface declaration.
 */
public interface ISingleThreadedExecutor extends Executor {

	/**
	 * Returns if or if not the current thread is identical to the executor
	 * thread.
	 *
	 * @return <code>True</code> if the current thread is the executor thread,
	 *         <code>false</code> otherwise.
	 */
	public boolean isExecutorThread();

	/**
	 * Returns if or if not the given thread is identical to the executor
	 * thread.
	 *
	 * @param thread
	 *            The thread or <code>null</code>.
	 * @return <code>True</code> if the current thread is the executor thread,
	 *         <code>false</code> otherwise.
	 */
	public boolean isExecutorThread(Thread thread);
}

Back to the top