Sha256: 1a1631fb19516b71774e239780410c59312c062b835513ef4614a984a9959ece
Contents?: true
Size: 423 Bytes
Versions: 7
Compression:
Stored size: 423 Bytes
Contents
module NodeRb class BackWorker < Thread def initialize block super do block.call end end end class << self def defer work = nil, callback = nil, &block work = block if not work and block callback = block if not callback and block work ||= proc { } callback ||= proc { |result| } NodeRb.defer_native(BackWorker.new(work), callback) end end end
Version data entries
7 entries across 7 versions & 1 rubygems