Skip to content

Thread safety and Possible race conditions #27

@theodoreOnzGit

Description

@theodoreOnzGit

Hello, thanks for providing such a wonderful piece of software.

Ive been writing code based on your modules and for some reason when i use xunit, there happens to be unrepeatable wrong unit exceptions which come. It means like once every twenty or thirty test runs, a wrong unit exception comes up.

When i rerun the tests, it disaappears and the tests pass.

It's about 200+ tests, and i strongly suspect it's because xunit does things in parallel, and also because some classes use static operators eg, addition and subtraction.

I strongly suspect a race condition as several classes or test cases are accessing static operators at the same time. And therefore it's not really thread safe.

Were there any of such cases before?

And what are some possible fixes we can work towards?

Edit: I'll also be checking in case my code (or what i'm building off - spicesharp) isn't thread safe. But tbh i have never used static methods in my code and all the exceptions and errors i've gotten were from the EngineeringUnits package tho.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions