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

Not Thread Safe? #1870

Closed
collinanderson opened this issue Sep 12, 2014 · 3 comments
Closed

Not Thread Safe? #1870

collinanderson opened this issue Sep 12, 2014 · 3 comments

Comments

@collinanderson
Copy link
Contributor

See the weird behavior here: https://code.djangoproject.com/ticket/23475

My analysis of the situation:
In the traceback, I see the the request object disappears and then reappears in the traceback. It looks like it's being stored in field.context.

Fields objects are shared between requests, right? and context holds request-specific information right? That's not thread-safe.

@xordoquy
Copy link
Collaborator

Actually they are copied thought i need to double check it is a deep copy

@xordoquy
Copy link
Collaborator

Duplicate of #1869

@tomchristie
Copy link
Member

Fields objects are shared between requests, right?

No. Fields are newly copied from the base_fields attribute when their parent serializer is instantiated. (Which happens on a per-request basis.)

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

3 participants