When should one prefer ThreadLocal over synchronization, apart from for the performance improvement? Please explain using a real life example.
When should one prefer ThreadLocal over synchronization, apart from for the performance improvement? Please explain using a real life example.