Skip to content

Consider using new TimeProvider instead of ITimer and ITimerFactory #2084

@joperezr

Description

@joperezr

Now that TimeProvider APIs have been added to .NET 8.0, we should consider if we want to replace some internal types that are used by Yarp. For instance, we should be able to replace

https://github.com/microsoft/reverse-proxy/blob/b6f00851fc1032706c275b414244a95ef70d3a26/src/ReverseProxy/Utilities/ITimerFactory.cs#L8-L11

with The new TimeProvider.CreateTimer that was introduced:

https://github.com/dotnet/runtime/blob/ce4857970dff1e987a3991238c8b32e8eae3cab7/src/libraries/Common/src/System/TimeProvider.cs#L137

cc: @tarekgh @Tratcher

Metadata

Metadata

Assignees

Labels

Type: IdeaThis issue is a high-level idea for discussion.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions