#476: GCD Groups should be a wrapper around dispatch, not its own invocation style ----------------------------------------+----------------------------------- Reporter: ernest.prabha...@… | Owner: lsansone...@… Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: gcd ----------------------------------------+-----------------------------------
Comment(by conra...@…): After reading through the specification, I would like to see the following more explicit API: {{{ queue = Dispatch::Queue.new( "comp.lang.MyCustomerQueue", attribute = nil ) queue.dispatch_async( &block ) queue.dispatch_sync( &block ) queue.dispatch_apply( iterations, &block ) group = Dispatch::Group.new group.dispatch_async( queue, &block ) group.dispatch_wait( Dispatch::TIME_FOREVER ) group.dispatch_release }}} These are just some of my thoughts because I was looking for something that was inline with the C API. Also, the explicit API eliminates the need for 'if' constructs within the function definition within 'gcd.c'. Next, we can namespace this by adding both the Group and Queue classes within the module Dispatch. -- Ticket URL: <http://www.macruby.org/trac/ticket/476#comment:8> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel