#477: Need GCD wrapper for dispatch_once ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- We need an API for dispatch_once: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPag... http://developer.apple.com/mac/library/documentation/Performance/Reference/G... http://www.opensource.apple.com/source/libdispatch/libdispatch-84.5.1/src/on... http://www.opensource.apple.com/source/libdispatch/libdispatch-84.5.1/src/on... Ideally something as simple as: Dispatch::Once.new { run_this_once } The tricky part is that the "Once" would have to allocate (the equivalent of) a global or static dispatch_once_t (i.e., a long). Could that be done with class variables? -- Ticket URL: <http://www.macruby.org/trac/ticket/477> MacRuby <http://macruby.org/>