django serializers are not thread safe!
|Reported by:||sector119||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have to deserialize, serialize objects in multiple threads with django serializers.
But when I run Deserializer = serializers.get_deserializer(SERIALIZATION_FORMAT) in my threads (more then one, with _one_ thread all works great) I get KeyError? in get_serializer function at return _serializers[format].Deserializer line because _load_serializers does not load all data at _serializers dict before another tread run get_deserializer at this another thread and completely populate serializers dictionary with all, builtin and user-defined serializers! That is why I think that get_(de)?serializers and/or _load_serializers must be thread safe like _populate function at AppCache?!
Change History (10)
Changed 7 years ago by mrts
comment:1 Changed 7 years ago by mrts
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:5 Changed 7 years ago by mrts
- Component changed from Uncategorized to Serialization
- milestone set to 1.0