summaryrefslogtreecommitdiff
path: root/lib/drb
diff options
context:
space:
mode:
authorKoichi Sasada <[email protected]>2020-10-13 13:16:08 +0900
committerKoichi Sasada <[email protected]>2020-10-14 14:02:06 +0900
commit11c2f0f36ccc50899a8dd69a260e85451f68b5ba (patch)
tree4d968f2742fb0cb4d260c1f2c6b2695184e21d9e /lib/drb
parentc3ba3fa8d01aa3970dc1f4e3dc0090ae171e9e35 (diff)
sync enc_table and rb_encoding_list
enc_table which manages Encoding information. rb_encoding_list also manages Encoding objects. Both are accessed/modified by ractors simultaneously so that they should be synchronized. For enc_table, this patch introduced GLOBAL_ENC_TABLE_ENTER/LEAVE/EVAL to access this table with VM lock. To make shortcut, three new global variables global_enc_ascii, global_enc_utf_8, global_enc_us_ascii are also introduced. For rb_encoding_list, we split it to rb_default_encoding_list (256 entries) and rb_additional_encoding_list. rb_default_encoding_list is fixed sized Array so we don't need to synchronized (and most of apps only needs it). To manage 257 or more encoding objects, they are stored into rb_additional_encoding_list. To access rb_additional_encoding_list., VM lock is needed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3654
Diffstat (limited to 'lib/drb')
0 files changed, 0 insertions, 0 deletions