protected virtual AssetBase GetAsset (UUID uuid)
{
lock (this)
m_waitingForObjectAsset = true;
m_assetCache.Get (uuid.ToString (), this, AssetReceived);
// The asset cache callback can either
//
// 1. Complete on the same thread (if the asset is already in the cache) or
// 2. Come in via a different thread (if we need to go fetch it).
//
// The code below handles both these alternatives.
lock (this)
{
if (m_waitingForObjectAsset)
{
Monitor.Wait (this);
m_waitingForObjectAsset = false;
}
}
return m_requestedObjectAsset;
}