call

call(*args) Instance Public methods Calls the constructed BlockCaller, with args For an example see ::new

new

new(ctype, args, abi = Fiddle::Function::DEFAULT, &block) Class Public methods Description Construct a new BlockCaller object. ctype is the C type to be returned args are passed the callback abi is the abi of the closure If there is an error in preparing the ffi_cif or ffi_prep_closure, then a RuntimeError will be raised. Example include Fiddle cb = Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |one| one end func = Function.new(cb, [TYPE_INT], TYPE_INT)

transfer

fiber.transfer(args, ...) â obj Instance Public methods Transfer control to another fiber, resuming it from where it last stopped or starting it if it was not resumed before. The calling fiber will be suspended much like in a call to Fiber.yield. You need to require 'fiber' before using this method. The fiber which receives the transfer call is treats it much like a resume call. Arguments passed to transfer are treated like those passed to resume. You cannot resume a fiber that tr

resume

fiber.resume(args, ...) â obj Instance Public methods Resumes the fiber from the point at which the last Fiber.yield was called, or starts running it if it is the first call to resume. Arguments passed to resume will be the value of the Fiber.yield expression or will be passed as block parameters to the fiber's block if this is the first resume. Alternatively, when resume is called it evaluates to the arguments passed to the next Fiber.yield statement inside the fiber's block or t

alive?

fiber.alive? â true or false Instance Public methods Returns true if the fiber can still be resumed (or transferred to). After finishing execution of the fiber block this method will always return false. You need to require 'fiber' before using this method.

yield

Fiber.yield(args, ...) â obj Class Public methods Yields control back to the context that resumed the fiber, passing along any arguments that were passed to it. The fiber will resume processing at this point when resume is called next. Any arguments passed to the next resume will be the value that this Fiber.yield expression evaluates to.

current

Fiber.current() â fiber Class Public methods Returns the current fiber. You need to require 'fiber' before using this method. If you are not running in the context of a fiber this method will return the root fiber.

|

false | obj â true or falsenil | obj â true or false Instance Public methods OrâReturns false if obj is nil or false; true otherwise.

to_s

to_s() Instance Public methods 'nuf said⦠old_to_s inspect

old_to_s

old_to_s() Instance Public methods Alias for: to_s