Repository navigation
Added
-
With the new keyword-only
release_gil=True, other Python threads run while Cedar validates policies or builds a handle, soasyncio.to_threadkeeps an event loop responsive during those calls (#120). The default,False, holds the GIL for the whole call, as before. These entry points take it:validate_policiesPolicySet.from_str,PolicySet.from_json_strandPolicySet.from_pstSchema.from_strandSchema.from_json_strEntities.from_json_str
When another thread is busy, a released call typically waits about
sys.getswitchinterval()(5 ms by default) to resume, so releasing pays off for calls that take milliseconds or more. Reading the arguments and building the result still hold the GIL. See the Threads and asyncio Guide (#121). Thanks @kousun12!
Full Changelog: v4.12.1...v4.12.2