You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: narrow exclusive write lock duration in App.add_exception_handler #288
The exclusive write lock self.state.write() is acquired before dynamically importing inspect and invoking inspect.iscoroutinefunction. This unnecessarily extends the exclusive write lock duration across multiple Python attribute lookups and function calls.
Proposed Solution
Receive py: Python<'_> in the method signature or compute is_async before taking self.state.write().
Restrict state.write() only to the push and st.rebuild_snapshot() operations.
Acceptance Criteria
iscoroutinefunction check is performed prior to acquiring the write lock.
Activity