#565: GCD sources should return passed-in handle for handle method
---------------------------+------------------------------------------------
Reporter: j...@… | Owner: ernest.prabha...@…
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/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel