public string get()
{
string s;
lock (this) {
while (q.Count == 0) { Monitor.Wait(this); };
s = q.Dequeue();
Monitor.PulseAll(this);
}
return s;
}