mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-19 00:06:57 +00:00
Just always run in thread
This commit is contained in:
parent
d3ca02fa3f
commit
2ccdd183c1
@ -638,10 +638,7 @@ async def read_encoded(
|
||||
|
||||
# Pycddl will release the GIL when validating larger documents, so
|
||||
# let's take advantage of multiple CPUs:
|
||||
if size > 10_000:
|
||||
await defer_to_thread(reactor, schema.validate_cbor, message)
|
||||
else:
|
||||
schema.validate_cbor(message)
|
||||
await defer_to_thread(reactor, schema.validate_cbor, message)
|
||||
|
||||
# The CBOR parser will allocate more memory, but at least we can feed
|
||||
# it the file-like object, so that if it's large it won't be make two
|
||||
|
Loading…
x
Reference in New Issue
Block a user