summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2023-01-20 08:33:00 -0800
committerJeremy Evans <code@jeremyevans.net>2023-01-20 08:36:06 -0800
commitffd52412ab813854d134dbbc2b60f698fe536487 (patch)
treee4b4cf7b26a92ebd724720cbae924b5effd580e5
parent0457e43423b8ecf2653125a32dad5e272ce55e25 (diff)
Document thread-safety issues with Hash default_proc
Fixes [Bug #19237]
-rw-r--r--hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 2b243d9e66..0f10c633f9 100644
--- a/hash.c
+++ b/hash.c
@@ -7051,6 +7051,10 @@ static const rb_data_type_t env_data_type = {
*
* Note that setting the default proc will clear the default value and vice versa.
*
+ * Be aware that a default proc that modifies the hash is not thread-safe in the
+ * sense that multiple threads can call into the default proc concurrently for the
+ * same key.
+ *
* === What's Here
*
* First, what's elsewhere. \Class \Hash: