Do operations on ThreadLocal have to be synchronized?
问题 Here is the code I've stumbled across: class TransactionContextHolder { private static final ThreadLocal<TransactionContext> currentTransactionContext = new NamedInheritableThreadLocal<TransactionContext>( "Test Transaction Context"); static TransactionContext getCurrentTransactionContext() { return currentTransactionContext.get(); } static void setCurrentTransactionContext(TransactionContext transactionContext) { currentTransactionContext.set(transactionContext); } static TransactionContext