Sha256: 9f9eb6010c3146e07940f75369d6934edeb5d5d576d238b133265def8c05d77a
Contents?: true
Size: 434 Bytes
Versions: 17
Compression:
Stored size: 434 Bytes
Contents
class Object def with_large_stack(stack_size_kb = 64, &block) result = nil t = Thread.with_large_stack(&proc{result = block.call}) t.join result end end class Thread def self.with_large_stack(stack_size_kb = 128, &block) runnable = RunnableWrapper.new(block).to_native t = Java::java.lang.Thread.new(nil, runnable, "block with large stack", stack_size_kb * 1024) t.start t end end
Version data entries
17 entries across 17 versions & 1 rubygems