I have a multi-threaded environment, managed by a "pool". This pool guarantees that only one thread at a time can access the shared resource. Once the resource gets released by the thread which is currently using it, the resource returns back to the pool and can be used by other threads. Synchronization is done by using ReentrantLock inside the Pool. Should I consider using volatile for shared resource's class attributes?
Thanks.