Handling async operations in a synchronous ITimeZoneProvider interface #629
-
|
Hello, I’m trying to implement ITimeZoneProvider in order to provide correct timezone offset values based on the user’s browser. For this, I need to call a IJSRuntime function as shown below, but doing so causes a deadlock. Converting GetTimeZone() into Task would violate the existing interface contract, so I’m looking for advice on the best way to integrate asynchronous runtime calls in a design where the interface is synchronous. @sfmskywalker Best Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Makes sense. Best would be to refactor the timeline provider interface to support async. Please feel free to raise a PR to that effect. Alternatively, we’ll take care of it, at some point. |
Beta Was this translation helpful? Give feedback.
Makes sense. Best would be to refactor the timeline provider interface to support async. Please feel free to raise a PR to that effect. Alternatively, we’ll take care of it, at some point.