summaryrefslogtreecommitdiff
path: root/include/ruby/io
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2024-12-21 11:27:09 +0100
committergit <svn-admin@ruby-lang.org>2025-01-14 11:54:47 +0000
commit2f5d31d38ad6918410da1c41936e043f47725d4f (patch)
treedd7dbddff68ed5983b00782996cf8aecd4fa8218 /include/ruby/io
parentccb4ba45ed0439764fc44a40469e396187d83a71 (diff)
[ruby/openssl] Reduce OpenSSL::Buffering#do_write overhead
[Bug #20972] The `rb_str_new_freeze` was added in https://github.com/ruby/openssl/issues/452 to better handle concurrent use of a Socket, but SSL sockets can't be used concurrently AFAIK, so we might as well just error cleanly. By using `rb_str_locktmp` we can ensure attempts at concurrent write will raise an error, be we avoid causing a copy of the bytes. We also use the newer `String#append_as_bytes` method when available to save on some more copies. https://github.com/ruby/openssl/commit/0d8c17aa85 Co-Authored-By: luke.gru@gmail.com
Diffstat (limited to 'include/ruby/io')
0 files changed, 0 insertions, 0 deletions