Document thread-safety issues with Hash default_proc

Fixes [Bug #19237]
This commit is contained in:
Jeremy Evans 2023-01-20 08:33:00 -08:00
Родитель 0457e43423
Коммит ffd52412ab
1 изменённых файлов: 4 добавлений и 0 удалений

4
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: