class SharedObjectPool {

    public void remove(T obj)
    {
        myWriteLock.lock();
        try
        {
            myPool.remove(obj);
        }
        finally
        {
            myWriteLock.unlock();
        }
    }

}