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

Caution #1

Open
valq7711 opened this issue Nov 28, 2020 · 0 comments
Open

Caution #1

valq7711 opened this issue Nov 28, 2020 · 0 comments

Comments

@valq7711
Copy link

Сaution

Only variable itself is thread safe, not its content:
if there is self.x = dict(a ='foo') in one thread and self.x['a'] = 'bar' in another one (without preliminary reinitialization self.x with fresh dict), self.x['a'] will be changed everywhere, even in iceblock, since the latter is a shallow copy.

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

No branches or pull requests

1 participant