Skip to content
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

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Conversation

iancooper
Copy link
Member

Quick fixes

@iancooper iancooper merged commit f6022f5 into master Dec 31, 2024
4 of 6 checks passed
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a 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) 🚩

View detailed results in CodeScene

Comment on lines +198 to +207
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);
}

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

Suppress

Comment on lines -309 to -315
try
{
var taskTwo = context.Factory.StartNew(
() => { value = 2; },
context.Factory.CancellationToken,
context.Factory.CreationOptions | TaskCreationOptions.DenyChildAttach,
context.TaskScheduler);

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

Suppress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant