Azure / Azure/azure-functions-host
Small refactor to HostBuiltChangeTokenSource
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
If you look at this code, it's hardcoded to explicitly signal for the one specific tokensource class:
https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs#L381-L384
We have the need to add a second class that we want to react to this -- and rather than add another `if` statement and directly signal the affected classes, we should share a token across them that we can signal here and trigger them all simultaneously. Similar to what we do with StandbyOptions where triggering the StandbyToken can propagate to all affected other options that need re-built.
Contributor guide
Research direction
Start in src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs around lines 381-384 and inspect HostBuiltChangeTokenSource and the StandbyOptions/StandbyToken pattern. Trace the affected token-source classes, then confirm that one shared token can be signaled there so all affected classes rebuild simultaneously without another class-specific condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100