module Rbgo::CoRunExtensions
Public Instance Methods
go(*args, &blk)
click to toggle source
# File lib/rbgo/corun.rb, line 393 def go(*args, &blk) CoRun::Routine.new(*args, new_thread: false, queue_tag: :default, &blk) end
go!(*args, &blk)
click to toggle source
# File lib/rbgo/corun.rb, line 397 def go!(*args, &blk) CoRun::Routine.new(*args, new_thread: true, queue_tag: :none, &blk) end
have_other_task_on_thread?()
click to toggle source
# File lib/rbgo/corun.rb, line 401 def have_other_task_on_thread? CoRun.have_other_task_on_thread? end
yield_accept()
click to toggle source
# File lib/rbgo/corun.rb, line 429 def yield_accept CoRun.accept_from(self) end
yield_connect(remote_sockaddr)
click to toggle source
# File lib/rbgo/corun.rb, line 433 def yield_connect(remote_sockaddr) CoRun.connect_to(self, remote_sockaddr: remote_sockaddr) end
yield_io(&blk)
click to toggle source
# File lib/rbgo/corun.rb, line 405 def yield_io(&blk) CoRun.yield_io(&blk) end
yield_read(len = nil)
click to toggle source
# File lib/rbgo/corun.rb, line 411 def yield_read(len = nil) CoRun.read_from(self, length: len) end
yield_read_line(sep = $/, limit = nil)
click to toggle source
# File lib/rbgo/corun.rb, line 415 def yield_read_line(sep = $/, limit = nil) CoRun.read_line_from(self, sep: sep, limit: limit) end
yield_read_partial(maxlen)
click to toggle source
# File lib/rbgo/corun.rb, line 419 def yield_read_partial(maxlen) CoRun.read_partial_from(self, maxlen: maxlen) end
yield_recv(maxlen, flags = 0)
click to toggle source
# File lib/rbgo/corun.rb, line 437 def yield_recv(maxlen, flags = 0) CoRun.recv_from(self, maxlen: maxlen, flags: flags) end
yield_recvmsg(maxdatalen = nil, flags = 0, maxcontrollen = nil, opts = {})
click to toggle source
# File lib/rbgo/corun.rb, line 441 def yield_recvmsg(maxdatalen = nil, flags = 0, maxcontrollen = nil, opts = {}) CoRun.recvmsg_from(self, maxdatalen: maxdatalen, flags: flags, maxcontrollen: maxcontrollen, opts: opts) end
yield_sendmsg(mesg, flags = 0, dest_sockaddr = nil, *controls)
click to toggle source
# File lib/rbgo/corun.rb, line 445 def yield_sendmsg(mesg, flags = 0, dest_sockaddr = nil, *controls) CoRun.sendmsg_to(self, mesg, flags: flags, dest_sockaddr: dest_sockaddr, controls: controls) end
yield_write(str)
click to toggle source
# File lib/rbgo/corun.rb, line 423 def yield_write(str) CoRun.write_to(self, str: str) end