MarimerLLC / csla

A home for your business logic in any .NET application.
https://cslanet.com
MIT License
1.27k stars 406 forks source link

Backporting 3633 to v7.x #4262

Closed tkyle closed 1 month ago

tkyle commented 1 month ago

#3633

Backporting LocalProxy changes to v7.x so it's thread safe.

rockfordlhotka commented 1 month ago

@tkyle have you tested this against your code base?

tkyle commented 1 month ago

@rockfordlhotka, I have.

I tested it in our code base and it solved our issue.

I also had a demo application I created that reproduced the issue by creating multiple threads. This application was also fixed after I made the code change.

In the past we've had issues with CSLA, dependency injection / scoping, and connection leaks. After testing my code change I didn't notice any connection leaks.

Also, to test scoping, I added some test code to one of our connection factories and made sure that it wasn't just pulling the injected connection factory from the root container each time. This seemed to work as expected.

If you need me to perform additional testing I can, but I'd need you to tell me specifically what to look into.

rockfordlhotka commented 4 weeks ago

@tkyle am I right in remembering that you were doing the backport as a 2-part PR? As in there is another PR coming with more changes to complete the v7 solution?

tkyle commented 3 weeks ago

Well, we did discuss that. I thought about adding in the code for the async changes you guys made where it waits until all calls are done, but I opted to not worry about that for right now. I'm not sure that it would benefit us at this time.

After discussing it with my team lead we decided it was best / easiest to just see if this one change got us to where we needed to be, and hopefully we'll just be able to update our CSLA version again in the near future-ish and get the benefit of all the additional changes you guys have made without having to try and backport anything extra.

rockfordlhotka commented 3 weeks ago

OK, I will see if I can build the v7 codebase or not.