ReadNewEntries() public static method

public static ReadNewEntries ( int sinceIdx, int &newIdx ) : MemoryMappedLog.LogEntry[]
sinceIdx int
newIdx int
return MemoryMappedLog.LogEntry[]
Esempio n. 1
0
        void OnNewEntries()
        {
            if (this.Halt == true)
            {
                return;
            }

            var entries = MMLog.ReadNewEntries(m_logIndex, out m_logIndex);

            AddRange(entries);
        }
Esempio n. 2
0
        static void ReaderMain()
        {
            int sinceIdx = 0;
            int tick     = 0;

            while (s_exit == false)
            {
                var entries = MMLog.ReadNewEntries(sinceIdx, out sinceIdx);

                for (int i = 0; i < entries.Length; ++i)
                {
                    if (entries[i].Tick != tick)
                    {
                        throw new Exception();
                    }

                    tick++;
                }
            }
        }