-
Notifications
You must be signed in to change notification settings - Fork 731
Removed redundant multithreading #1027
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
Removed redundant multithreading #1027
Conversation
|
It hang again. |
|
Maybe we try using what I've done in Chill: https://github.com/ChillBDD/Chill/pull/78/files |
Thanks very much for this link. Interesting solution! I'll see what I can do :) |
|
@dennisdoomen the build is now passing. Please review this pull request and let me know your thoughts. Thanks very much again for that ChillBDD suggestion. |
|
If I understand the purpose of If that is correct, shouldn't it be enough to only call
as they are, as far as I could see, exactly the boundaries of calling |
Thanks for the feedback, you've raised an excellent point. I'll get right on it :) |
@jnyrup I've now pushed these changes. Please let me know if this is what you had in mind, or if you have other suggestions. Thanks very much |
|
Looks good! What happens if I execute one the following sync-over-async snippets, that calls into Action act = () => Task.Delay(0).Wait(0);
act.Should().NotThrow();Func<bool> func = () => Task.Delay(0).Wait(0);
func.Should().NotThrow(); |
My bad, I'll resolve this.
You've raised an excellent point. I could be mistaken but I don't think we have any test cases like this already. I'll create some and see if we have any potential issues. Thanks very much! |
|
@jnyrup I've made the changes to remove the superfluous namespaces and whitespace. I've also added some new tests with the scenarios you described above. Those tests seem to pass fine but it looks like the current build is failing due to one of those other flaky tests which are being investigated separately. Do we need to retry the AppVeyor build somehow? Please let me know if you have any other issues or suggestions. Thanks very much :) |
jnyrup
left a comment
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.
Looks good @davidomid
Out of curiosity, does this solve any problem you've encountered, or did you look at the source code and found the use of await Task.Run() odd?
@dennisdoomen Do you know if we can manually trigger a build, just to verify that the failing test is "just" flaky and not permanently failing?
|
It just looked odd to me. When I looked into it, it looked a lot like it was only there to prevent deadlocks, so I thought it would be good to investigate and try to fix the underlying issue instead. In terms of retrying the build, I could always push a blank commit to force it to rebuild but I don't want to pollute the commit history and would rather ask if there's an alternative first :) |
|
@davidomid or, if you haven't tried before and would like to train your git-fu, you could trigger a build by rebasing on master into atomic commits, e.g.
Not the case for this PR, but for large PR atomic commits greatly simplifies reviewing. |
I'll do it for this one :) Thanks for the advice! |
6eb39b2 to
c043c0f
Compare
|
I've made the commits atomic and the latest build was successful :) Please let me know if there's anything else you'd like me to resolve. |
|
Well done @davidomid. Thanks for the hard work. |
These were introduced in fluentassertions#1027 when `AsyncFunctionAssertions` had blocking calls. We have since embraced async code better.
These were introduced in #1027 when `AsyncFunctionAssertions` had blocking calls. We have since embraced async code better.
These were introduced in #1027 when `AsyncFunctionAssertions` had blocking calls. We have since embraced async code better.
Fix for issue #1020
Removed redundant multithreading which was implemented using Task.Run.