From ffd52412ab813854d134dbbc2b60f698fe536487 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 20 Jan 2023 08:33:00 -0800 Subject: Document thread-safety issues with Hash default_proc Fixes [Bug #19237] --- hash.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hash.c') 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: -- cgit v1.2.1