Esempio n. 1
0
        public async Task StopAsync()
        {
            PrepareToStop();

            // Wait until reader is done
            if (m_injectionRequestReader != null)
            {
                await m_injectionRequestReader.CompletionAsync(true);
            }
        }
Esempio n. 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;
                }
            }
        }