public T WaitNext(int nTimeOutMs) { if (GotNewMessageEvent.WaitOne(nTimeOutMs) == false) { return(default(T)); } return(PopNextMessage()); }
public T[] WaitAll(int nTimeOutMs) { GotNewMessageEvent.WaitOne(nTimeOutMs); return(PopAllMessages()); }