#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 ernest.prabha...@…):
Here's an alternative proposal that would probably be simpler to
implement:
group.for_queue(q).dispatch(sync) { block }
That is, group.dispatch would take a 'sync' parameter, just like
queue.dispatch. The default would be the default queue, but the group
would have an ivar representing the "current' queue. This provides
consistency while avoiding the need to always specify the sync to define a
queue.
Of course, the syntax is ugly, but this allows us to define a convenience
method on queue:
queue.for(group).dispatch(sync) { block }
That seems the most consistent with how dispatch works outside of groups,
and semantically cleaner. Thoughts?
--
Ticket URL: <http://www.macruby.org/trac/ticket/476#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel