Closed GustavoCaso closed 1 year ago
If we do not like the execute
method we could rename the C methods to _start
and _stop
and add simply wrapper in Ruby land.
module GvlTracing
class << self
private :_start
private :_stop
def start(filename)
_start(filename)
if block_given?
yield
_stop
end
end
def stop
_stop
end
end
end
Looks good! In #12 indeed we already are wrapping start
/stop
with Ruby versions as you suggested -- do you mind rebasing on top of master and adding the block_given?
to start
directly as you suggested?
@ivoanjo Done 🎉
Add a new module function
execute(filename)
intoGvlTracing
wrapping call ofstart
andstop
methods.This is one of the tasks from https://github.com/ivoanjo/gvl-tracing/issues/13