[MacRuby] #565: GCD sources should return passed-in handle for handle method
#565: GCD sources should return passed-in handle for handle method ---------------------------+------------------------------------------------ Reporter: jkh@… | Owner: ernest.prabhakar@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ In this small example of a socket source: s = TCPServer.open(hostname, port) src = Dispatch::Source.new(Dispatch::Source::READ, s, 0, q) { |src| sock = src.handle sock.accept } You don't actually get the original handle back and therefore cannot call the accept function on it. Sources should encapsulate the original handle so that you can safely get it inside the handler block. -- Ticket URL: <http://www.macruby.org/trac/ticket/565> MacRuby <http://macruby.org/>
#565: GCD sources should return passed-in handle for handle method ---------------------------+------------------------------------------------ Reporter: jkh@… | Owner: ernest.prabhakar@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Changes (by ernest.prabhakar@…): * status: new => closed * resolution: => fixed Comment: Fixed in r3320 Changed to allow (and return) anything that can respond to "to_i" as a handle, for maximum flexibility. -- Ticket URL: <http://www.macruby.org/trac/ticket/565#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby