Commit d9819d1
Changed files (2)
product
infrastructure
threading
product/infrastructure/threading/IntervalTimer.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using gorilla.utility;
namespace gorilla.infrastructure.threading
{
@@ -37,5 +38,11 @@ namespace gorilla.infrastructure.threading
timers[client_to_stop_notifying].Stop();
timers[client_to_stop_notifying].Dispose();
}
+
+ public void Dispose()
+ {
+ timers.each(x => x.Value.Dispose());
+ timers.Clear();
+ }
}
}
\ No newline at end of file
product/infrastructure/threading/Timer.cs
@@ -2,7 +2,7 @@
namespace gorilla.infrastructure.threading
{
- public interface Timer
+ public interface Timer : IDisposable
{
void start_notifying(TimerClient client_to_be_notified, TimeSpan span);
void stop_notifying(TimerClient client_to_stop_notifying);