Before this patch, if you called json_schema() for the same object across multiple threads at the same time, you would (sometimes!) get a SchemaError about None is not of type 'object', 'boolean' with references to schema['definitions']. The fix is to create a global lock around all writes to _schema, with checks for the happy path to avoid hitting the lock too frequently.
Some fixes to provide thread safety in hologram.
Before this patch, if you called
json_schema()
for the same object across multiple threads at the same time, you would (sometimes!) get aSchemaError
aboutNone is not of type 'object', 'boolean'
with references toschema['definitions']
. The fix is to create a global lock around all writes to_schema
, with checks for the happy path to avoid hitting the lock too frequently.