Skip to content

Commit

Permalink
.NET 6: PeriodicTimer scheduler replacement for dedicated thread (#…
Browse files Browse the repository at this point in the history
…6435)

* cleaned up `TimerScheduler`

* stash

* .NET 6 implementation of `PeriodicTimer` for scheduler

* added post-stop code

* handle `OperationCanceledException`

* Fix implementation and code cleanup (#168)

* Fix implementation and code cleanup

* Fix clock drift calculation

* Fix fixed clock drift bug

* Update API approval list

* Add low resolution timer warning

* Fix unix/windows stopwatch ticks difference

* Revert thread locking

* Revert changes to old code, even the stupid ones

* Code cleanup

* Fix null TaskCompletionSource bug

* Add documentation comments

---------

Co-authored-by: Gregorius Soedharmo <[email protected]>
  • Loading branch information
Aaronontheweb and Arkatufus authored Aug 23, 2023
1 parent 0a66f94 commit c5b1320
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,8 @@ namespace Akka.Actor
protected override void PreStart() { }
protected override bool Receive(object message) { }
}
public class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable
[System.Runtime.CompilerServices.NullableAttribute(0)]
public sealed class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable
{
public HashedWheelTimerScheduler(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { }
public override System.TimeSpan HighResMonotonicClock { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ namespace Akka.Actor
protected override void PreStart() { }
protected override bool Receive(object message) { }
}
public class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable
[System.Runtime.CompilerServices.NullableAttribute(0)]
public sealed class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable
{
public HashedWheelTimerScheduler(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { }
public override System.TimeSpan HighResMonotonicClock { get; }
Expand Down
Loading

0 comments on commit c5b1320

Please sign in to comment.