The thread pool factory is a process-wide resource. It is important that all UNO environments within a process share the same thread pool mechanisms: if a synchronous UNO call is bridged out from one local UNO environment over one remote bridge, and recursively calls back into another local UNO environment over another remote bridge, the code in the second environment should be executed in the thread that did the original call from the first environment.
There are both a Java and a native thread pool factory. A pure Java
process will always use the Java thread pool factory. A mixed process uses
the system property org.openoffice.native (to be set by the
native code that starts the JVM) to determine which implementation
to use.
| Modifier and Type | Field and Description |
|---|---|
| private static JavaThreadPoolFactory | |
| private static boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static synchronized IThreadPool | |
| public static synchronized boolean | Returns: false if a Java thread pool has already been created.Leads to using the native thread pool factory, unless a Java thread pool has already been created. |
| javaFactory | back to summary |
|---|---|
| private static JavaThreadPoolFactory javaFactory | |
| useNative | back to summary |
|---|---|
| private static boolean useNative | |
| ThreadPoolManager | back to summary |
|---|---|
| private ThreadPoolManager() | |
| create | back to summary |
|---|---|
| public static synchronized IThreadPool create() Creates a thread pool instance.
| |
| useNative | back to summary |
|---|---|
| public static synchronized boolean useNative() Leads to using the native thread pool factory, unless a Java thread pool has already been created.
| |