public Hashtable[] Get(MemBlock key) {
BlockingQueue returns = new BlockingQueue();
AsyncGet(key, returns);
ArrayList values = new ArrayList();
while(true) {
// Still a chance for Dequeue to execute on an empty closed queue
// so we'll do this instead.
try {
Hashtable hash = (Hashtable) returns.Dequeue();
values.Add(hash);
}
catch (Exception) {
break;
}
}
return (Hashtable[]) values.ToArray(typeof(Hashtable));
}