My team and I encountered a nasty capnp issue. We have a python application running in a multithreaded environment. Nominally, we dynamically import capnp schemas at runtime, populate them, send our serialized data, and all is good.
However I noticed that if bugs were encountered in the serialization process, sometimes these capnp schemas were not released from the global_schema_parser.
We were able to fix these issues by running capnp.cleanup_global_schema_parser(), but this hunch was more of guess and check than anything.
Is there a way to list all imported schemas ?
How does capnp ensure that imported schemas are properly released from the GIL when a python thread exits ?
My team and I encountered a nasty capnp issue. We have a python application running in a multithreaded environment. Nominally, we dynamically import capnp schemas at runtime, populate them, send our serialized data, and all is good.
However I noticed that if bugs were encountered in the serialization process, sometimes these capnp schemas were not released from the global_schema_parser.
We were able to fix these issues by running
capnp.cleanup_global_schema_parser()
, but this hunch was more of guess and check than anything.Is there a way to list all imported schemas ? How does capnp ensure that imported schemas are properly released from the GIL when a python thread exits ?