[MacRuby] #1478: Dispatch::Queue#barrier_{sync, async} should check OS version at runtime

MacRuby ruby-noreply at macosforge.org
Fri Mar 2 05:04:55 PST 2012


#1478: Dispatch::Queue#barrier_{sync, async} should check OS version at runtime
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 When runs MacRuby on OS X 10.6 which is built on OS X 10.7,
 Dispatch::Queue#barrier_{sync, async} cause crash.

 OS version check exists at compile-time. [[BR]]
 https://github.com/MacRuby/MacRuby/blob/master/gcd.c#L511-521 [[BR]]
 https://github.com/MacRuby/MacRuby/blob/master/gcd.c#L544-554

 I think these methods also need to check at runtime.

 {{{
 gcdq = Dispatch::Queue.concurrent('org.macruby.documentation')
 p gcdq.class
 @i = ""
 gcdq.barrier_sync { @i += 'c' }
 gcdq.barrier_async { @i += 'c' }
 }}}

 {{{
 $ uname -a
 Darwin watson.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

 $ macruby t.rb
 dyld: Symbol not found: __dispatch_queue_attr_concurrent
   Referenced from:
 /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/libmacruby.dylib
   Expected in: flat namespace
  in
 /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/libmacruby.dylib
 zsh: trace trap  macruby t.rb
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1478>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list