Skip to content

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed May 27, 2020
1 parent 1c94f05 commit ce9999a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
相比[`InheritableThreadLocal`](https://docs.oracle.com/javase/10/docs/api/java/lang/InheritableThreadLocal.html),添加了

1. `copy`方法
用于定制 **任务提交给线程池时**`ThreadLocal`值传递到 **任务执行时** 的拷贝行为,缺省传递的是引用。
用于定制 **任务提交给线程池时**`ThreadLocal`值传递到 **任务执行时** 的拷贝行为,缺省传递的是引用。
注意:如果跨线程传递了对象引用因为不再有线程封闭,与`InheritableThreadLocal.childValue`一样,使用者/业务逻辑要注意传递对象的线程安全。
1. `protected``beforeExecute`/`afterExecute`方法
执行任务(`Runnable`/`Callable`)的前/后的生命周期回调,缺省是空操作。

Expand Down

0 comments on commit ce9999a

Please sign in to comment.