From 4b0ff842b2517c89c8a89502c333f34028efa19b Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 20 Nov 2024 22:40:14 +1300 Subject: [PATCH] Add nogvl test. --- test/io/buffer.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/io/buffer.rb diff --git a/test/io/buffer.rb b/test/io/buffer.rb new file mode 100644 index 0000000..fc1725b --- /dev/null +++ b/test/io/buffer.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2024, by Samuel Williams. + +describe IO::Buffer do + it "can copy a large buffer (releasing the GVL)" do + source = IO::Buffer.new(1024 * 1024 * 10) + destination = IO::Buffer.new(source.size) + + source.copy(destination) + end +end