Package play.libs.concurrent
Class ClassLoaderExecution
java.lang.Object
play.libs.concurrent.ClassLoaderExecution
ExecutionContexts that preserve the current thread's context ClassLoader by passing it through
ClassLoaderExecutionContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic scala.concurrent.ExecutionContextExecutorfromThread(Executor delegate) An ExecutionContext that executes work on the given ExecutionContext.static scala.concurrent.ExecutionContextExecutorfromThread(scala.concurrent.ExecutionContext delegate) An ExecutionContext that executes work on the given ExecutionContext.static scala.concurrent.ExecutionContextExecutorfromThread(scala.concurrent.ExecutionContextExecutor delegate) An ExecutionContext that executes work on the given ExecutionContext.
-
Constructor Details
-
ClassLoaderExecution
public ClassLoaderExecution()
-
-
Method Details
-
fromThread
public static scala.concurrent.ExecutionContextExecutor fromThread(scala.concurrent.ExecutionContext delegate) An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext.
-
fromThread
public static scala.concurrent.ExecutionContextExecutor fromThread(scala.concurrent.ExecutionContextExecutor delegate) An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext.
-
fromThread
An ExecutionContext that executes work on the given ExecutionContext. The current thread's context ClassLoader is captured when this method is called and preserved for all executed tasks.- Parameters:
delegate- the delegate execution context.- Returns:
- the execution context wrapped in an
ClassLoaderExecutionContext.
-