Beispiel #1
0
        public void WriteItemSequence(IEnumerable <T> source)
        {
            DryadLinqRecordWriter <T> writer = this.m_writers[0];

            if (m_dvertexEnv.MultiThreading)
            {
                foreach (T item in source)
                {
                    writer.WriteRecordAsync(item);
                }
            }
            else
            {
                foreach (T item in source)
                {
                    writer.WriteRecordSync(item);
                }
            }
            this.CloseWriters();
        }
Beispiel #2
0
        public void WriteItemSequence(IEnumerable <T> source)
        {
            DryadLinqRecordWriter <T> writer = this.m_writers[0];

            if (DryadLinqVertex.ThreadCount > 1)
            {
                foreach (T item in source)
                {
                    writer.WriteRecordAsync(item);
                }
            }
            else
            {
                foreach (T item in source)
                {
                    writer.WriteRecordSync(item);
                }
            }
            this.CloseWriters();
        }