Skip to content

Conversation

@Qard
Copy link
Member

@Qard Qard commented Sep 29, 2025

This is mainly just about converting the RwLock to a Mutex to be absolutely sure there can never be one ensure_python_event_loop creating a new loop while another is about to write its own created loop. Rather than allowing and writes to interleave we just fully lock it down so any access has to wait until the full logic is complete. Because we never actually read this outside of construction, we don't really need to care about the perf difference between a Mutex and a RwLock.

@Qard Qard self-assigned this Sep 29, 2025
@Qard Qard added the enhancement New feature or request label Sep 29, 2025
@Qard Qard force-pushed the safety-improvements branch from 87aebf7 to c7b86a1 Compare September 29, 2025 14:40
@Qard Qard merged commit b2b2de4 into main Sep 29, 2025
60 checks passed
@Qard Qard deleted the safety-improvements branch September 29, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants