Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-09-27 21:58:53 +0000
committerThomas Watson2016-09-27 21:58:53 +0000
commit711ff81d73350c6492b5acc96cc4cddc6906f30f (patch)
tree3f2f2cb85f9d0bc3bb3db1adcc270bc738273040 /bundles/org.eclipse.osgi/container
parent3fe546d7f67aeaa04c91851b40c53e6cccaf94fa (diff)
downloadrt.equinox.framework-711ff81d73350c6492b5acc96cc4cddc6906f30f.tar.gz
rt.equinox.framework-711ff81d73350c6492b5acc96cc4cddc6906f30f.tar.xz
rt.equinox.framework-711ff81d73350c6492b5acc96cc4cddc6906f30f.zip
Bug 502318 - osgi.framework.activeThreadType is no longer usedY20160929-1000
Change-Id: I54fa1cce33e778d02a792b7c24a651c30555d08e Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/container')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java9
2 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
index c82fc7201..619a1c0e6 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
@@ -209,6 +209,9 @@ public class EquinoxConfiguration implements EnvironmentInfo {
public static final Collection<String> PROP_WITH_ECLIPSE_STARTER_DEFAULTS = Collections.singletonList(PROP_COMPATIBILITY_BOOTDELEGATION);
public static final String PROP_INIT_UUID = "equinox.init.uuid"; //$NON-NLS-1$
+ public static final String PROP_ACTIVE_THREAD_TYPE = "osgi.framework.activeThreadType"; //$NON-NLS-1$
+ public static final String ACTIVE_THREAD_TYPE_NORMAL = "normal"; //$NON-NLS-1$
+
public static final class ConfigValues {
/**
* Value of {@link #localConfig} properties that should be considered
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
index def3ffde7..87011f38b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2015 IBM Corporation and others.
+ * Copyright (c) 2012, 2016 IBM Corporation 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
@@ -272,8 +272,13 @@ public class EquinoxContainer implements ThreadFactory, Runnable {
@Override
public Thread newThread(Runnable r) {
+ String type = equinoxConfig.getConfiguration(EquinoxConfiguration.PROP_ACTIVE_THREAD_TYPE, EquinoxConfiguration.ACTIVE_THREAD_TYPE_NORMAL);
Thread t = new Thread(r, "Active Thread: " + toString()); //$NON-NLS-1$
- t.setDaemon(false);
+ if (EquinoxConfiguration.ACTIVE_THREAD_TYPE_NORMAL.equals(type)) {
+ t.setDaemon(false);
+ } else {
+ t.setDaemon(true);
+ }
t.setPriority(Thread.NORM_PRIORITY);
return t;
}

Back to the top