alirezanet / Gridify

Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
https://alirezanet.github.io/Gridify/
MIT License
807 stars 64 forks source link

Concurrently changing GridifyGlobalConfigurations causes inconsistent behavior #179

Open alirezanet opened 2 months ago

alirezanet commented 2 months ago

Version

v2.14.2

Details

This issue can be identified and tested within the project's unit tests. Changing the global configuration for a single test can result in other tests' failure, which might also happen in the production environment and actual code base.

Steps to reproduce

add this test: e.g:

   [Fact]
   public async Task ConcurrencyIssue()
   {
      GridifyGlobalConfiguration.DisableNullChecks = true;
      await Task.Delay(100);
      GridifyGlobalConfiguration.DisableNullChecks = false;
   }

and run all the unit-tests:

image