lib/rbbt/util/concurrency/processes/socket.rb in rbbt-util-5.14.17 vs lib/rbbt/util/concurrency/processes/socket.rb in rbbt-util-5.14.18

- old
+ new

@@ -8,21 +8,21 @@ @sread, @swrite = Misc.pipe @serializer = serializer || Marshal - key = "/" << rand(100000000).to_s; - @write_sem = key + '.in' - @read_sem = key + '.out' - Log.low "Creating socket semaphores: #{key}" + @key = "/" << rand(1000000000).to_s << '.' << Process.pid.to_s; + @write_sem = @key + '.in' + @read_sem = @key + '.out' + Log.medium "Creating socket semaphores: #{@key}" RbbtSemaphore.create_semaphore(@write_sem,1) RbbtSemaphore.create_semaphore(@read_sem,1) end def clean @sread.close unless @sread.closed? @swrite.close unless @swrite.closed? - Log.low "Destroying socket semaphores" + Log.medium "Destroying socket semaphores: #{[@key] * ", "}" RbbtSemaphore.delete_semaphore(@write_sem) RbbtSemaphore.delete_semaphore(@read_sem) end