示例#1
0
        public async Task StopAsync()
        {
            PrepareToStop();

            // Wait until reader is done
            if (m_injectionRequestReader != null)
            {
                await m_injectionRequestReader.CompletionAsync(true);
            }
        }
示例#2
0
        private async Task WaitUntilReportEof(bool cancel)
        {
            using (await m_reportReaderSemaphore.AcquireAsync())
            {
                if (m_reportReader != null)
                {
                    await m_reportReader.CompletionAsync(!cancel);

                    m_reportReader.Dispose();
                    m_reportReader = null;
                }
            }
        }