Skip to content

feat: Asynchronous experiment cancellation - #168

Merged
JoshHiles merged 3 commits into
scientistproject:masterfrom
JoshHiles:feature/async-cancellation
Nov 25, 2025
Merged

JoshHiles merged 3 commits into
scientistproject:masterfrom
JoshHiles:feature/async-cancellation

Conversation

@JoshHiles

@JoshHiles JoshHiles commented Nov 21, 2025 •

Copy link
Copy Markdown
Contributor

this closes #165

New experiment.WithCancellationToken() & overloads for the async Try & Catch

@JoshHiles

Copy link
Copy Markdown
Contributor Author

Tests were failing on a21eb17 as the EnsureNullGuardIsWorking tests don't run in DEBUG mode, I'm wondering if we should remove this?

Anyways the null ref ex throws earlier as we build the Behaviours from the Candidate which causes the null ref ex to throw earlier. I think this is correct way to fix but open to feedback

M-Zuber
M-Zuber previously approved these changes Nov 25, 2025

@M-Zuber M-Zuber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
there is that one variable that looks like it should have been removed

Comment thread src/Scientist/Internals/Experiment.cs Outdated
@JoshHiles

Copy link
Copy Markdown
Contributor Author

there is that one variable that looks like it should have been removed

I've double checked the project build settings and we do have level 4 warnings & we don't have CS0168 excluded.
Just wondering if there's a way to catch this next time in VS?
Is this because we support net451 ?

@M-Zuber

M-Zuber commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

there is that one variable that looks like it should have been removed

I've double checked the project build settings and we do have level 4 warnings & we don't have CS0168 excluded. Just wondering if there's a way to catch this next time in VS? Is this because we support net451 ?

TBH I don't know
(and personally I am not that concerned about this particular error...)

@JoshHiles

Copy link
Copy Markdown
Contributor Author

Groovy!
Apologies in advance, their will be another PR through for the release notes at somepoint

@JoshHiles
JoshHiles merged commit 6edfbfe into scientistproject:master Nov 25, 2025
5 checks passed
@JoshHiles
JoshHiles deleted the feature/async-cancellation branch November 26, 2025 16:00
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.

[Feature] Support cancellable experiments

2 participants