brought zircon branch into trunk

This commit is contained in:
gareth
2007-03-22 10:11:15 +00:00
parent b83efd4947
commit 7daa3955bc
254 changed files with 23148 additions and 6670 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Threading;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Utilities
{
public class BlockingQueue<T>
{
private Queue<T> _queue = new Queue<T>();
private object _queueSync = new object();
public void Enqueue(T value)
{
lock (_queueSync)
{
_queue.Enqueue(value);
Monitor.Pulse(_queueSync);
}
}
public T Dequeue()
{
lock (_queueSync)
{
if (_queue.Count < 1)
Monitor.Wait(_queueSync);
return _queue.Dequeue();
}
}
}
}