class BasicObject
Create a new future
Public Instance Methods
async()
click to toggle source
An asynchronous proxy. Executes any methods invoked via proxy on target in a separate thread
# File lib/fibril/basic_object.rb, line 9 def async @async_proxy ||= ::Fibril::AsyncProxy.new(self) end
await(*args, &block)
click to toggle source
# File lib/fibril/core.rb, line 296 def await(*args, &block) ::Fibril.current.await(*args, &block) end
fasync()
click to toggle source
An asynchronous proxy. Executes any methods invoked via proxy on target in a separate fork
# File lib/fibril/basic_object.rb, line 16 def fasync @fasync_proxy ||= ::Fibril::FAsyncProxy.new(self) end
ffuture(&blk)
click to toggle source
Create a new forked future
# File lib/fibril/control.rb, line 17 def ffuture(&blk) return ::Fibril::FFuture.new(&blk) end
fibril(*guard_names, &block)
click to toggle source
This method has two methods of use. Either
-
call with block to create a new fibril
-
call without block to create a fibril proxy. Any methods invoked on a proxy are executed on the target from
within a new Fibril
# File lib/fibril/core.rb, line 284 def fibril(*guard_names, &block) if block_given? Fibril(*guard_names, &block) else ::Fibril::FibrilProxy.new(self, *guard_names) end end
future(&blk)
click to toggle source
# File lib/fibril/control.rb, line 10 def future(&blk) return ::Fibril::Future.new(&blk) end
tick(*guard_names, **args)
click to toggle source
# File lib/fibril/core.rb, line 292 def tick(*guard_names, **args) ::Fibril::TickProxy.new(self, *guard_names, **args) end