-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update method signatures, and minor fixes #3448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.08 (9.31 -> 9.23)
- Declining Code Health: 2 findings(s) 🚩
private void ExecuteOnCallersContext(ContextCallback contextCallback, object? state, ExecutionContext ctxt) | ||
{ | ||
Debug.WriteLine(string.Empty); | ||
Debug.IndentLevel = 1; | ||
Debug.Fail("BrighterSynchronizationContext: ExecuteOnCallersContext. We should never get here"); | ||
Debug.WriteLine($"BrighterSynchronizationContext: Post Failed to queue {contextCallback.Method.Name} on thread {Thread.CurrentThread.ManagedThreadId}"); | ||
Debug.WriteLine($"BrighterSynchronizationContext: Parent Task {ParentTaskId}"); | ||
Debug.IndentLevel = 0; | ||
SynchronizationHelper.ExecuteOnContext(ctxt, contextCallback, state); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: ExecuteImmediately,ExecuteOnCallersContext
try | ||
{ | ||
var taskTwo = context.Factory.StartNew( | ||
() => { value = 2; }, | ||
context.Factory.CancellationToken, | ||
context.Factory.CreationOptions | TaskCreationOptions.DenyChildAttach, | ||
context.TaskScheduler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Getting worse: Code Duplication
introduced similar code in: Task_AfterExecute_NeverRuns,Task_AfterExecute_Runs_On_ThreadPool
Quick fixes