문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 | |||
|
java:threadlocal [2016/02/27 22:05] kwon37xi |
java:threadlocal [2024/12/11 20:05] (현재) kwon37xi [Java ThreadLocal] |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Java ThreadLocal ====== | ====== Java ThreadLocal ====== | ||
| - | * [[http:// | + | * [[https:// |
| Each thread holds an implicit reference to its copy of a thread-local variable | Each thread holds an implicit reference to its copy of a thread-local variable | ||
| 줄 6: | 줄 6: | ||
| after a thread goes away, all of its copies of thread-local instances are subject | after a thread goes away, all of its copies of thread-local instances are subject | ||
| to garbage collection (unless other references to these copies exist). | to garbage collection (unless other references to these copies exist). | ||
| + | | ||
| + | ===== withInitialValue ===== | ||
| + | * 초기값을 생성하는 lambda 를 지정해두면 최초에 값이 없을 때에 적절한 초기값을 제공해준다. | ||
| + | * '' | ||
| + | |||
| ===== 참조 ===== | ===== 참조 ===== | ||