private void ExecuteOnTimerThread(IAsyncFiber fiber) { if (_interval.Ticks == TimeSpan.FromMilliseconds(-1).Ticks || _cancelled) { fiber.Remove(this); DisposeTimer(); } if (!_cancelled) { fiber.Enqueue(ExecuteAsync); } }
public void Dispose() { _disposed = true; _fiber.Remove(this); _sub?.Dispose(); }