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

Shared locals with binds #887

Merged
merged 6 commits into from Jun 9, 2019

Conversation

Projects
None yet
2 participants
@oleg-py
Copy link
Collaborator

commented May 24, 2019

A continuation of #866. This makes sure Local.bind - and TaskLocal.bind, in presence of concurrent accesses - work as expected.

This is done by making a Local.Context, essentially, a linked list of mutable bunch-of-vars + a map with all the rest in the end. Because bind scopes work like a stack, it makes for a good model there. It's obviously less efficient, but it should be about the same for existing code, and isolating context would "squash" the list back.

Diff seems bigger b/c it includes #866 (isolate on Local and TaskLocal is still there, too)

@oleg-py oleg-py requested review from alexandru and Avasil May 24, 2019

@Avasil

Avasil approved these changes May 30, 2019

@Avasil Avasil merged commit 4927c53 into monix:master Jun 9, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.