Skip to content

Commit

Permalink
improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Oct 1, 2024
1 parent 1d23af6 commit cce786a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions xprof/xprof.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ end
# |_) _. ._ ._ o _ ._
# |_) (_| | | | (/_ |
#
class Sync_daemon
class SyncDaemon
SIGRTMIN = 34
RT_SIGNAL_READY = SIGRTMIN
RT_SIGNAL_GLOBAL_BARRIER = SIGRTMIN + 1
Expand Down Expand Up @@ -280,13 +280,13 @@ class Sync_daemon
end

LOGGER.debug { "spawn(#{daemon} #{Process.pid})" }
lazy_exec("Initialize Sync_daemon #{daemon_type}") do
lazy_exec("Initialize SyncDaemon #{daemon_type}") do
@pid = spawn("#{daemon} #{Process.pid}")
end
end

def finalize
lazy_exec('Finalize Sync_daemon') do
lazy_exec('Finalize SyncDaemon') do
`kill -#{RT_SIGNAL_FINISH} #{@pid}`
end
end
Expand All @@ -306,14 +306,14 @@ class Sync_daemon
# Context manager, ensure that when the block yield is exited
# we always call clean-up the daemon
def self.open
yield f = new
yield syncd = new
rescue Errno::ENOENT
exit(1)
ensure
# https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/EnsureReturn
if f
f.global_barrier
f.finalize
if syncd
syncd.global_barrier
syncd.finalize
end
end
end
Expand Down Expand Up @@ -669,7 +669,7 @@ def trace_and_on_node_processing(usr_argv)
lm_lttng_kill_sessiond
end

Sync_daemon.open do |syncd|
SyncDaemon.open do |syncd|
# Load Tracers and APILoaders Lib
backends, h = env_tracers

Expand Down

0 comments on commit cce786a

Please sign in to comment.