Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add threadsafety note to Dict docstring #43820

Conversation

IanButterworth
Copy link
Member

It seems helpful to add something like this?

@oscardssmith oscardssmith added the docs This change adds or pertains to documentation label Jan 15, 2022
@tkf
Copy link
Member

tkf commented Jan 16, 2022

Note that even iterating over Dict is not data-race-free ATM #35835

I'm also personally against an uncoordinated whack-a-mole approach like this. I think a better approach is to clarify what it means to be "thread-safe" (there are possibly multiple kinds of "thread-safety"), document it, and then document methods and/or data structures with a link to the manual section that clarifies what kinds of "thread-safety" that a given usage of a set of methods provides. I'm also assuming that we note that everything is "thread-unsafe" unless documented otherwise.

Until then, maybe notes like this can live in something like a community-driven wiki (e.g., Discourse post) that can be rapidly iterated over.

@tkf tkf added the multithreading Base.Threads and related functionality label Jan 16, 2022
@IanButterworth
Copy link
Member Author

Closing as the approach above sounds better

@IanButterworth IanButterworth deleted the ib/dict_threadsafety_note branch January 22, 2022 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants