[MacRuby] #337: Bug in rb_source_new_timer in gcd.c
#337: Bug in rb_source_new_timer in gcd.c ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Maybe I'm missing something, but shouldn't "&delay" be in this argument list? rb_scan_args(argc, argv, "21", &queue, &interval, &leeway); If not, where is delay initialized? ---- rb_source_new_timer(VALUE klass, SEL sel, int argc, VALUE* argv) { dispatch_time_t start_time; VALUE queue = Qnil, interval = Qnil, delay = Qnil, leeway = Qnil; rb_scan_args(argc, argv, "21", &queue, &interval, &leeway); if (NIL_P(leeway)) { leeway = INT2FIX(0); } if (NIL_P(delay)) { start_time = DISPATCH_TIME_NOW; } else { start_time = dispatch_walltime(NULL, number_to_nanoseconds(delay)); } -- Ticket URL: <http://www.macruby.org/trac/ticket/337> MacRuby <http://macruby.org/>
#337: Bug in rb_source_new_timer in gcd.c ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@…): You're right, looks like Patrick missed that one. Now, I'm not familiar with this GCD API so I don't know if it should be before or after leeway. Any suggestion? -- Ticket URL: <http://www.macruby.org/trac/ticket/337#comment:1> MacRuby <http://macruby.org/>
#337: Bug in rb_source_new_timer in gcd.c ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by ernest.prabhakar@…): The relevant GCD API is: dispatch_source_set_timer(dispatch_source_t source, dispatch_time_t start, uint64_t interval, uint64_t leeway); Which maps into delay, interval, leeway. So, if you were following that convention it would be: &queue, &delay, &interval, &leeway) -- Ticket URL: <http://www.macruby.org/trac/ticket/337#comment:2> MacRuby <http://macruby.org/>
#337: Bug in rb_source_new_timer in gcd.c ----------------------------------------+----------------------------------- Reporter: ernest.prabhakar@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Fixed in r3057. Note that the source APIs have not been tested/spec'ed yet. -- Ticket URL: <http://www.macruby.org/trac/ticket/337#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby