Skip to content
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

[DO NOT MERGE] Poor main attempt to battle thread safety #31

Closed
wants to merge 3 commits into from

Conversation

leotsarev
Copy link
Contributor

@leotsarev leotsarev commented Mar 20, 2020

Instead of approach in #24 (basically synchronize all access to ObjectContainer), i tried another approach.
Idea is to instead of container to synchronize access itself, it attempts synchronize access to parent container between other child containers. It not 100% solution (because those who use parent container directly will have to be careful to participate in synchronization, but in theory it will be more performant than #24 (because if you only one using container, you don't need to pay for synchronization). I need to way to check if this is actually win for Specflow's usecase (may be not, cause Specflow use a long chain of containers).

I'm planning to benchmark every solution, but I have not settled on right profile.

This and #24 has a problem of holding the container-wide lock during construction of object. It could be very costly if your constructors are heavy.

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.

1 participant