#511: GCD crash with indirect method access ---------------------------------------+------------------------------------ Reporter: joshua.balla...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: GCD ---------------------------------------+------------------------------------
Comment(by joshua.balla...@…): A day of Yak shaving later, and it seems that the root cause is calling "invalidate_method_cache" as part of method resolution when another thread already has the cached method in use. As suggested by Laurent, first calling the methods once on the main thread fixes the issue: {{{ class Foo def doit puts "hi there!" end end class Bar def initialize @foo = Foo.new end def step 100.times{ @foo.doit } end end @bars = [] 1000.times { @bars << Bar.new } @bars.each(&:step) steps = Dispatch::Group.new @bars.each do |bar| Dispatch::Queue.concurrent.async(steps) { bar.step } end steps.wait }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/511#comment:9> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel