Method: ASIR::UUID#thread_uuid
- Defined in:
- lib/asir/uuid.rb
#thread_uuid(thr = nil) ⇒ Object
Returns a unique counter_uuid for a Thread. thr defaults to Thread.current.
57 58 59 60 61 62 |
# File 'lib/asir/uuid.rb', line 57 def thread_uuid thr = nil thr ||= Thread.current @@thread_uuid_mutex.synchronize do thr[:'ASIR::UUID.thread_uuid'] ||= counter_uuid end end |