Exemple #1
0
        private bool _open()
        {
            bool success = false;

            lock (_accesslock) {
                success = (_rawinterface != null && _rawinterface.Open());
                if (success)
                {
                    treader = new Thread(new ThreadStart(_readerThreadLoop));
                    twriter = new Thread(new ThreadStart(_writerThreadLoop));
                    //
                    treader.Start();
                    twriter.Start();
                }
            }
            return(success);
        }
Exemple #2
0
        private bool Open()
        {
            bool success = false;

            lock (accessLock)
            {
                success = (rawInterface != null && rawInterface.Open());
                if (success)
                {
                    readerTask = new Thread(new ThreadStart(ReaderThreadLoop));
                    writerTask = new Thread(new ThreadStart(WriterThreadLoop));
                    //
                    readerTask.Start();
                    writerTask.Start();
                }
            }
            return(success);
        }