#597: Dispatch Queue async method inconsistent results
--------------------------------------+-------------------------------------
 Reporter:  knut.olaf.l...@…          |       Owner:  ernest.prabha...@…        
     Type:  defect                    |      Status:  new                       
 Priority:  blocker                   |   Milestone:                            
Component:  MacRuby                   |    Keywords:  GCD async method          
--------------------------------------+-------------------------------------

Comment(by ernest.prabha...@…):

 Well, it works for q.sync, which is a good sign:

 8.times {|i| q.sync {result[i] = fib(i)}}

 And it works for me (on the latest trunk) with q.async:
 8.times {|i| q.async {result[i] = fib(i)}}
 q.sync {}

 But, I do get odd behavior with async(grp).

 8.times {|i| q.async(grp) {result[i] = fib(i)}}

 grp.wait
 p result => [nil, 1, 1, 2, 3, 5, 8, 13]

 Hmm.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/597#comment:2>
MacRuby <http://macruby.org/>

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to