public int DoWork() { int workCount = 0; if (CheckForClockTick()) { PollServiceAdapter(); workCount += 1; } if (null != logAdapter) { int polled = logAdapter.Poll(); if (0 == polled) { if (logAdapter.IsDone()) { logAdapter.Dispose(); logAdapter = null; } } workCount += polled; } return(workCount); }
public int DoWork() { int workCount = 0; if (CheckForClockTick()) { PollServiceAdapter(); workCount += 1; } if (null != logAdapter.Image()) { int polled = logAdapter.Poll(commitPosition.Get()); if (0 == polled && logAdapter.IsDone()) { CloseLog(); } workCount += polled; } return(workCount); }