rubix
rubix copied to clipboard
Use semaphore in ObjectPool
The intent of the change is to remove the synchronization block while getting/returning objects from pool and use a semaphore to enable parallel object creation.
Also, can you please the exact motivation for using semaphore in the object pool? Were things like atomic counter + mutex locking or blocking queue not enough for controlling concurrency? (and why if they were not).
Also, can you please the exact motivation for using semaphore in the object pool? Were things like atomic counter + mutex locking or blocking queue not enough for controlling concurrency? (and why if they were not).
changed the description. please check.