We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e9bbea commit fe3a89dCopy full SHA for fe3a89d
lib/sidekiq/component.rb
@@ -57,6 +57,9 @@ def redis(&block)
57
end
58
59
def tid
60
+ # We XOR with PID to ensure Thread IDs changes after fork.
61
+ # I'm unclear why we don't multiply the two values to better guarantee
62
+ # a unique value but it's been this way for quite a while now. #3685
63
Thread.current["sidekiq_tid"] ||= (Thread.current.object_id ^ ::Process.pid).to_s(36)
64
65
0 commit comments