Luxoft interview question

What is the use case of ThreadLocal?

Interview Answer

Anonymous

14 May 2023

1. To make any object as thread-safe, e.g. SimpleDateFormat 2. To hold some request context variables (e.g. user_id, transaction_id)

1