Пример #1
0
        void SourceQueue_Process(object sender, ProcessQueueEventArgs <Tuple <byte[], int, int> > e)
        {
            var ar = SourceStream.BeginWrite(e.Item.Item1, e.Item.Item2, e.Item.Item3, null, null);

            using (ar.AsyncWaitHandle)
            {
                if (ar.AsyncWaitHandle.WaitOne(-1))
                {
                    SourceStream.EndWrite(ar);
                }
            }
        }