Class InternalRunnable
java.lang.Object
org.apache.dubbo.common.threadlocal.InternalRunnable
- All Implemented Interfaces:
Runnable
InternalRunnable
There is a risk of memory leak when using
InternalThreadLocal without calling
InternalThreadLocal.removeAll().
This design is learning from which is in Netty.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()After the task execution is completed, it will callInternalThreadLocal.removeAll()to clear unnecessary variables in the thread.static RunnableWrap ordinary Runnable intoInternalThreadLocal.
-
Constructor Details
-
InternalRunnable
-
-
Method Details
-
run
public void run()After the task execution is completed, it will callInternalThreadLocal.removeAll()to clear unnecessary variables in the thread. -
Wrap
Wrap ordinary Runnable intoInternalThreadLocal.
-