⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Fiber
/
View File Name :
new-c.ri
U:RDoc::AnyMethod[iI"new:ETI"Fiber::new;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"QCreates new Fiber. Initially, fiber is not running, but can be resumed with ;TI"O#resume. Arguments to the first #resume call would be passed to the block:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I" f = Fiber.new do |initial| ;TI" current = initial ;TI" loop do ;TI"- puts "current: #{current.inspect}" ;TI" current = Fiber.yield ;TI" end ;TI" end ;TI".f.resume(100) # prints: current: 100 ;TI"4f.resume(1, 2, 3) # prints: current: [1, 2, 3] ;TI".f.resume # prints: current: nil ;TI"# ... and so on ... ;T:@format0o; ; [I"[if
blocking: false
is passed to the
Fiber.new
, _and_ current thread ;TI"Thas Fiber.scheduler defined, the Fiber becomes non-blocking (see "Non-blocking ;TI"$fibers" section in class docs).;T: @fileI"cont.c;T:0@omit_headings_from_table_of_contents_below0I"9Fiber.new(blocking: false) { |*args| ... } -> fiber ;T0[ I"(*args);T@"FI" Fiber;TcRDoc::NormalClass00